This commit is contained in:
Thump604 2026-04-09 02:31:32 +00:00 committed by GitHub
commit 2cce558e58
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 10 additions and 0 deletions

View file

@ -215,10 +215,13 @@ The CLI will look for API keys in environment variables if not provided via `--a
| roo | `ROO_API_KEY` |
| anthropic | `ANTHROPIC_API_KEY` |
| openai-native | `OPENAI_API_KEY` |
| openai | `OPENAI_API_KEY` |
| openrouter | `OPENROUTER_API_KEY` |
| gemini | `GOOGLE_API_KEY` |
| vercel-ai-gateway | `VERCEL_AI_GATEWAY_API_KEY` |
The `openai` provider also reads `OPENAI_BASE_URL` to set a custom API endpoint (e.g., `http://localhost:8080/v1` for locally deployed models).
**Authentication Environment Variables:**
| Variable | Description |

View file

@ -5,6 +5,7 @@ import type { SupportedProvider } from "@/types/index.js"
const envVarMap: Record<SupportedProvider, string> = {
anthropic: "ANTHROPIC_API_KEY",
"openai-native": "OPENAI_API_KEY",
openai: "OPENAI_API_KEY",
gemini: "GOOGLE_API_KEY",
openrouter: "OPENROUTER_API_KEY",
"vercel-ai-gateway": "VERCEL_AI_GATEWAY_API_KEY",
@ -36,6 +37,11 @@ export function getProviderSettings(
if (apiKey) config.openAiNativeApiKey = apiKey
if (model) config.apiModelId = model
break
case "openai":
if (apiKey) config.openAiApiKey = apiKey
if (model) config.openAiModelId = model
if (process.env.OPENAI_BASE_URL) config.openAiBaseUrl = process.env.OPENAI_BASE_URL
break
case "gemini":
if (apiKey) config.geminiApiKey = apiKey
if (model) config.apiModelId = model

View file

@ -4,6 +4,7 @@ import type { OutputFormat } from "./json-events.js"
export const supportedProviders = [
"anthropic",
"openai-native",
"openai",
"gemini",
"openrouter",
"vercel-ai-gateway",