Repository navigation
Conversation
For the hackathon's Gemini track, and as the first step toward moving Cue to Gemini. gemini.js makes one generateContent call to gemini-3.8-flash with Google Search grounding and Cue's display tools as function declarations, built from the same schemas, and returns the same actions, so public/ needs no change. Search runs on Google's side inside that one call, and display tools are fire-and-forget, so no tool results go back. Gemini returned 503 "high demand" and then 429 quota errors today, so any error, or no answer within GEMINI_TIMEOUT_MS (8 s), falls back to Claude for that tick and logs "gemini failed, using claude: ...". The default provider stays claude. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Tyler, 2026-11-13: if we're using Gemini, we're using Gemini. A Gemini error now fails the tick like a Claude error does, and the timeout is only a 30 s guard against a hung request. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Nov 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #55
Why
For Google's "Best Use of Gemini API" track, and as the first step toward moving Cue to Gemini.
CUE_MODEL_PROVIDER=geminiruns Cue's think call on Gemini. The default staysclaude, so nothing changes until the flag is set.For Tyler: this adds an outside service (Google's Gemini API) and a key,
GEMINI_API_KEY. The key the server reads from its environment pays for every tick while the flag is on.Change
gemini.js(new): each tick is onegenerateContentcall togemini-3.8-flash(GEMINI_MODEL, thinking levelGEMINI_THINKING, defaultlow). The call carries Google Search grounding and Cue's display tools as function declarations, built from the same schemas Claude gets, withadditionalPropertiesremoved since Gemini's schema subset doesn't accept it. Search runs on Google's side inside that one call, and display tools are fire-and-forget, so no tool results go back. It returns{actions, usage, note?}in the shapethink()already returns, sopublic/doesn't change. Tools added toDISPLAY_TOOLSlater carry over on their own.agent.js: picks the provider. There's no Claude fallback (Tyler, 2026-11-13: "if we're using gemini, we're using gemini"). A Gemini error fails the tick the way a Claude error does, andserver.jsanswers 500. The only timeout is a 30 s guard against a stuck request (GEMINI_TIMEOUT_MS).web_searchread as "Google Search" for Gemini.evals/replay.mjs: the summary line names the Gemini model when the flag is on.Screenshots
None: nothing visible changes.
Verified
npm run checkpasses.GEMINI_API_KEYin this machine's environment returns429 RESOURCE_EXHAUSTED("exceeded your current quota") on every Gemini model (3.8, 3.7, 3.5 Flash, 3.1 Flash-Lite). Drew is finding a working key. Until then, the request shape is untested, in particulartoolConfig.includeServerSideToolInvocations, which lets Google Search and function calls share a turn. I couldn't read Google's docs page for it. If the shape is wrong, the first call fails with Gemini's error message in the log.node evals/replay.mjsrun on Gemini and on Claude (score, latency, cost), added here as a table.Review
Needs an Opus review (it changes
agent.js). Not yet reviewed.🤖 Generated with Claude Code