Skip to content

[codex] Add Gemini default_api canary tests#25

Draft
gold-silver-copper wants to merge 3 commits into
mainfrom
codex/gemini-default-api-canary
Draft

[codex] Add Gemini default_api canary tests#25
gold-silver-copper wants to merge 3 commits into
mainfrom
codex/gemini-default-api-canary

Conversation

@gold-silver-copper

@gold-silver-copper gold-silver-copper commented May 21, 2026

Copy link
Copy Markdown
Owner

Summary

Adds an ignored live Gemini canary for a default_api tool-call namespace leak in Gemini streaming tool flows.

What Changed

  • Adds tests/providers/gemini/live/default_api.rs with a workspace-like Gemini streaming tool flow.
  • Wires the new live test into tests/providers/gemini/mod.rs.
  • Uses the same broad shape as the reported issue: gemini-3.1-pro-preview, thinking config, a declared JavaScript tool, a JavaScriptProgram schema via schema_for!, an ExecutorResponse(Result<Value, String>), .default_max_turns(...), .with_history(...), and stream consumption that records reasoning, tool calls, tool results, usage, and final text.
  • Keeps the fixture intentionally generic so the public test does not expose private application details.

Notes

The live canary is ignored by default because it requires GEMINI_API_KEY and calls the live Gemini API. When run manually, it can expose the namespace leak in Gemini reasoning text, e.g. default_api:JavaScript, even when the structured tool call is correctly named JavaScript.

Validation

  • cargo fmt
  • cargo test --test gemini streaming_javascript_tool_does_not_surface_default_api_or_empty_final_response
  • git diff --check

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.

1 participant