fix(gemini): use x-goog-api-key header to prevent dual-auth 400 error#8172
fix(gemini): use x-goog-api-key header to prevent dual-auth 400 error#8172konsisumer wants to merge 2 commits into
Conversation
8321de9 to
6b2bb3a
Compare
Switch Gemini provider auth from Authorization: Bearer (OpenAI SDK default) to Google's native x-goog-api-key header, ensuring exactly one credential reaches the endpoint and preventing the 400 dual-auth error. Applies to both the main agent client (run_agent.py) and auxiliary client (auxiliary_client.py) whenever the base URL targets generativelanguage.googleapis.com. Fixes NousResearch#7893
The whatsapp-bridge npm dependency @whiskeysockets/baileys uses a GitHub branch ref that requires git at install time. The test suite now exceeds 10 minutes on CI, bumping timeout to 15 minutes.
6b2bb3a to
738908a
Compare
|
Bumping: linked issue #7893 received two fresh reports in the past few hours (evandrojr on (Note: a separate class of reports in the same thread mentions Vertex-issued |
|
Closing in favor of #11961 (merged), which uses the same |
Summary
Authorization: Bearer(OpenAI SDK default) to Google's nativex-goog-api-keyheader, ensuring exactly one credential reaches the endpoint.run_agent.py) and auxiliary client (auxiliary_client.py) whenever the base URL targetsgenerativelanguage.googleapis.com.Fixes #7893
Test plan
tests/hermes_cli/test_gemini_provider.py— 43 tests pass (including newtest_gemini_uses_x_goog_api_key_header)tests/agent/test_auxiliary_client.py— Gemini-related tests pass with updated assertions