You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
where AIHOME_API_KEY is an env var that contains my desired key. The same behavior occurs with non env vars as well ("apiKey": "sk-SecretKeyHere")
This decision seems really strange to me, as a user-configured value in a non-default file (models.json doesn't exist by default) seems like it should take priority over somewhat generic env vars.
Does anyone have some thoughts as to why this was done this way?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Per the docs, the fixed env vars (
OPENAI_API_KEY,ANTHROPIC_API_KEY, etc are prioritized OVER the values in models.json:{ "providers": { "anthropic": { "baseUrl": "https://myhost/", "apiKey": "AIHOME_API_KEY" }, "openai": { "baseUrl": "https://myhost/v1", "api": "openai-responses", "apiKey": "AIHOME_API_KEY" } } }where
AIHOME_API_KEYis an env var that contains my desired key. The same behavior occurs with non env vars as well ("apiKey": "sk-SecretKeyHere")This decision seems really strange to me, as a user-configured value in a non-default file (
models.jsondoesn't exist by default) seems like it should take priority over somewhat generic env vars.Does anyone have some thoughts as to why this was done this way?
Beta Was this translation helpful? Give feedback.
All reactions