Repository navigation
Accept AQ. Gemini keys in setup - #4283
Lockyer228 wants to merge 3 commits into
Conversation
Google AI Studio now issues keys that start with AQ. setup only treated AIza as Gemini, so a valid key was rejected before the smoke test and, with no --provider, classified as OpenAI. Accept both prefixes. The live Gemini check redacts an echoed AQ key the same way it already redacted AIza. Co-authored-by: Lockyer <[email protected]>
Auth keys are AQ. plus the secret. The redactor treated the dot as the end of the token, so a real key in an error body was printed. The setup gate already accepted that shape. Co-authored-by: Lockyer <[email protected]>
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
|
Thanks for this, and for the live check showing the prefix gate no longer fires. We're considering it together with #4238, since the Gemini path also fails on the image format. If we take it, we'll rewrite it on current main and credit you as co-author. gstack is in a tooling freeze until November 21, so it will be looked at after that. |
|
Following up: we're taking this for #4239. It will be rebuilt on current main with you credited as co-author, and this PR will be closed with a link when it lands, after November 21. |
|
Thank you for this. We're picking up the idea. A maintainer agent working through a batch of fixes (our tracking thread GSTA-801) will first reproduce the problem on current main. If it reproduces, the agent rebuilds the fix on main with you credited as co-author, because we don't merge outside branches directly, and we'll close this PR with a link when it lands. If it no longer reproduces, we'll close this and say what changed. |
|
Thank you. Your change was rebuilt on current main and landed in #4684, with you credited as co-author. The rebuild also adds the |
Why (in your own words)
Google AI Studio now issues Gemini auth keys that start with
AQ.(AQ.Ab...).setupstill requiredAIza, so a valid key was rejected before the smoke test. Leave off--providerand the same key was classified as OpenAI, then rejected for not starting withsk-. This accepts both prefixes. The live Gemini check also redacts anAQ.key if an error body echoes it.Live evidence
On current main the gate is still one prefix. A fixture that starts with
AQ.fails before any request:After this change, same kind of fixture, temp home, no stub:
The saved file is mode 0600 and the stored prefix is
AQ.. Google rejected the fixture. That is the right failure for a fake key. The prefix gate did not fire, and the fixture was not printed.bun test design/test/gemini-provider.test.ts— 26 pass, 0 fail.Scope
design/src/cli.ts), the auth comment (design/src/auth.ts), the live-check redactor (design/scripts/live-gemini-check.ts), and the tests (design/test/gemini-provider.test.ts).setup --provider gemini --key-stdinwith anAQ.fixture, plus the Gemini provider test file.Liveness proof (required for external contributors)
No screenshot in this PR. I am not attaching a generated image.
Checklist
GSTACK PRtyped live into a real surface) or PR author is @garrytan (owner exemption)Fixes #4239