fix(gemini): avoid duplicate structured schema prompt#2277
Conversation
|
I did a quick local check because the only red job is Targeted checks on this branch passed for me: uv run --project hindsight-api-slim pytest hindsight-api-slim/tests/test_llm_extra_body.py -q
uv run --project hindsight-api-slim ruff format --check hindsight-api-slim/hindsight_api/engine/providers/gemini_llm.py hindsight-api-slim/tests/test_llm_extra_body.py
uv run --project hindsight-api-slim ruff check hindsight-api-slim/hindsight_api/engine/providers/gemini_llm.py
git diff --checkResult: |
|
@koriyoshi2041 confirmed — thanks for the targeted verification. The red |
Summary
system_instructionwhen nativeresponse_schemais already sentresponse_schemaon normal and cached structured callsFixes #1070.
Tests
uv run --project hindsight-api-slim pytest hindsight-api-slim/tests/test_llm_extra_body.py -quv run --project hindsight-api-slim ruff format --check hindsight-api-slim/hindsight_api/engine/providers/gemini_llm.py hindsight-api-slim/tests/test_llm_extra_body.pyuv run --project hindsight-api-slim ruff check hindsight-api-slim/hindsight_api/engine/providers/gemini_llm.pygit diff --checkCodex adversarial review approved after reworking the cached retry path so it does not drop cached context.