Wimmboo commited on
Commit
3b86f27
·
1 Parent(s): c6b6b9c

fix google auth: use Authorization Bearer for OpenAI-compatible endpoint

Browse files
Files changed (2) hide show
  1. .opencode/opencode.json +1 -0
  2. proxy/providers.py +2 -2
.opencode/opencode.json CHANGED
@@ -1,4 +1,5 @@
1
  {
 
2
  "plugin": [
3
  ".opencode/plugins/graphify.js"
4
  ]
 
1
  {
2
+ "$schema": "https://opencode.ai/config.json",
3
  "plugin": [
4
  ".opencode/plugins/graphify.js"
5
  ]
proxy/providers.py CHANGED
@@ -24,8 +24,8 @@ PROVIDERS: dict[str, Provider] = {
24
  "google": Provider(
25
  name="google",
26
  base_url="https://generativelanguage.googleapis.com/v1beta/openai",
27
- auth_header="x-goog-api-key",
28
- auth_value=lambda key: key,
29
  handles_202=False,
30
  env_real_key="REAL_GOOGLE_KEY",
31
  ),
 
24
  "google": Provider(
25
  name="google",
26
  base_url="https://generativelanguage.googleapis.com/v1beta/openai",
27
+ auth_header="Authorization",
28
+ auth_value=lambda key: f"Bearer {key}",
29
  handles_202=False,
30
  env_real_key="REAL_GOOGLE_KEY",
31
  ),