Skip to content

fix: Gemini structured output, rate limits, and inspection runtime issue fixed.#32

Open
sharvsave1023 wants to merge 1 commit into
Ay2012:mainfrom
sharvsave1023:fix/gemini-and-inspection-runtime
Open

fix: Gemini structured output, rate limits, and inspection runtime issue fixed.#32
sharvsave1023 wants to merge 1 commit into
Ay2012:mainfrom
sharvsave1023:fix/gemini-and-inspection-runtime

Conversation

@sharvsave1023

Copy link
Copy Markdown

Summary

  • Gemini: Structured JSON calls use response_json_schema with Pydantic-generated schemas that have Gemini-incompatible keywords removed, so the API no longer errors on additionalProperties. Optional per-minute throttling (GEMINI_MAX_REQUESTS_PER_MINUTE / GEMINI_RATE_LIMIT_WINDOW_SECONDS) helps stay within free-tier RPM. .env.example documents the new variables.
  • Inspection: The workflow’s end-to-end wall time (full LangGraph run) is stored as runtime_ms, returned from POST /chat, included in assistant metadata for thread reload, and shown in the inspection UI so Runtime is a millisecond value instead of “Not reported.”

How to test

Runtime: Run a real analysis, open Inspect SQL or Open execution detail, and confirm Runtime shows N ms in the stat row and under Results.

Gemini: Set LLM_PROVIDER=gemini and valid GEMINI_* keys, run a prompt, and confirm no additionalProperties / schema errors; optionally tune GEMINI_MAX_REQUESTS_PER_MINUTE and watch logs for throttle waits.

Closes #30

Record end-to-end LangGraph wall time as runtime_ms and pass it through the
API, persisted message metadata, and the React mappers so inspection
shows milliseconds instead of "not reported."

Gemini: use response_json_schema with a stripped JSON schema to avoid
additionalProperties errors; add optional RPM throttling via env.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Runtime not reported

1 participant