@mariozechner/pi-ai 0.68.0 → 0.68.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/env-api-keys.d.ts.map +1 -1
- package/dist/env-api-keys.js +1 -0
- package/dist/env-api-keys.js.map +1 -1
- package/dist/models.generated.d.ts +447 -51
- package/dist/models.generated.d.ts.map +1 -1
- package/dist/models.generated.js +468 -74
- package/dist/models.generated.js.map +1 -1
- package/dist/providers/amazon-bedrock.d.ts.map +1 -1
- package/dist/providers/amazon-bedrock.js +49 -9
- package/dist/providers/amazon-bedrock.js.map +1 -1
- package/dist/providers/anthropic.d.ts.map +1 -1
- package/dist/providers/anthropic.js +140 -8
- package/dist/providers/anthropic.js.map +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/utils/json-parse.d.ts +8 -1
- package/dist/utils/json-parse.d.ts.map +1 -1
- package/dist/utils/json-parse.js +89 -5
- package/dist/utils/json-parse.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -66,6 +66,7 @@ Unified LLM API with automatic model discovery, provider configuration, token an
|
|
|
66
66
|
- **Amazon Bedrock**
|
|
67
67
|
- **OpenCode Zen**
|
|
68
68
|
- **OpenCode Go**
|
|
69
|
+
- **Fireworks** (uses Anthropic-compatible API)
|
|
69
70
|
- **Kimi For Coding** (Moonshot AI, uses Anthropic-compatible API)
|
|
70
71
|
- **Any OpenAI-compatible API**: Ollama, vLLM, LM Studio, etc.
|
|
71
72
|
|
|
@@ -1025,6 +1026,7 @@ In Node.js environments, you can set environment variables to avoid passing API
|
|
|
1025
1026
|
| Groq | `GROQ_API_KEY` |
|
|
1026
1027
|
| Cerebras | `CEREBRAS_API_KEY` |
|
|
1027
1028
|
| xAI | `XAI_API_KEY` |
|
|
1029
|
+
| Fireworks | `FIREWORKS_API_KEY` |
|
|
1028
1030
|
| OpenRouter | `OPENROUTER_API_KEY` |
|
|
1029
1031
|
| Vercel AI Gateway | `AI_GATEWAY_API_KEY` |
|
|
1030
1032
|
| zAI | `ZAI_API_KEY` |
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env-api-keys.d.ts","sourceRoot":"","sources":["../src/env-api-keys.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAgChD;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,aAAa,GAAG,MAAM,GAAG,SAAS,CAAC;AAC1E,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC","sourcesContent":["// NEVER convert to top-level imports - breaks browser/Vite builds (web-ui)\nlet _existsSync: typeof import(\"node:fs\").existsSync | null = null;\nlet _homedir: typeof import(\"node:os\").homedir | null = null;\nlet _join: typeof import(\"node:path\").join | null = null;\n\ntype DynamicImport = (specifier: string) => Promise<unknown>;\n\nconst dynamicImport: DynamicImport = (specifier) => import(specifier);\nconst NODE_FS_SPECIFIER = \"node:\" + \"fs\";\nconst NODE_OS_SPECIFIER = \"node:\" + \"os\";\nconst NODE_PATH_SPECIFIER = \"node:\" + \"path\";\n\n// Eagerly load in Node.js/Bun environment only\nif (typeof process !== \"undefined\" && (process.versions?.node || process.versions?.bun)) {\n\tdynamicImport(NODE_FS_SPECIFIER).then((m) => {\n\t\t_existsSync = (m as typeof import(\"node:fs\")).existsSync;\n\t});\n\tdynamicImport(NODE_OS_SPECIFIER).then((m) => {\n\t\t_homedir = (m as typeof import(\"node:os\")).homedir;\n\t});\n\tdynamicImport(NODE_PATH_SPECIFIER).then((m) => {\n\t\t_join = (m as typeof import(\"node:path\")).join;\n\t});\n}\n\nimport type { KnownProvider } from \"./types.js\";\n\nlet cachedVertexAdcCredentialsExists: boolean | null = null;\n\nfunction hasVertexAdcCredentials(): boolean {\n\tif (cachedVertexAdcCredentialsExists === null) {\n\t\t// If node modules haven't loaded yet (async import race at startup),\n\t\t// return false WITHOUT caching so the next call retries once they're ready.\n\t\t// Only cache false permanently in a browser environment where fs is never available.\n\t\tif (!_existsSync || !_homedir || !_join) {\n\t\t\tconst isNode = typeof process !== \"undefined\" && (process.versions?.node || process.versions?.bun);\n\t\t\tif (!isNode) {\n\t\t\t\t// Definitively in a browser — safe to cache false permanently\n\t\t\t\tcachedVertexAdcCredentialsExists = false;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\n\t\t// Check GOOGLE_APPLICATION_CREDENTIALS env var first (standard way)\n\t\tconst gacPath = process.env.GOOGLE_APPLICATION_CREDENTIALS;\n\t\tif (gacPath) {\n\t\t\tcachedVertexAdcCredentialsExists = _existsSync(gacPath);\n\t\t} else {\n\t\t\t// Fall back to default ADC path (lazy evaluation)\n\t\t\tcachedVertexAdcCredentialsExists = _existsSync(\n\t\t\t\t_join(_homedir(), \".config\", \"gcloud\", \"application_default_credentials.json\"),\n\t\t\t);\n\t\t}\n\t}\n\treturn cachedVertexAdcCredentialsExists;\n}\n\n/**\n * Get API key for provider from known environment variables, e.g. OPENAI_API_KEY.\n *\n * Will not return API keys for providers that require OAuth tokens.\n */\nexport function getEnvApiKey(provider: KnownProvider): string | undefined;\nexport function getEnvApiKey(provider: string): string | undefined;\nexport function getEnvApiKey(provider: any): string | undefined {\n\t// Fall back to environment variables\n\tif (provider === \"github-copilot\") {\n\t\treturn process.env.COPILOT_GITHUB_TOKEN || process.env.GH_TOKEN || process.env.GITHUB_TOKEN;\n\t}\n\n\t// ANTHROPIC_OAUTH_TOKEN takes precedence over ANTHROPIC_API_KEY\n\tif (provider === \"anthropic\") {\n\t\treturn process.env.ANTHROPIC_OAUTH_TOKEN || process.env.ANTHROPIC_API_KEY;\n\t}\n\n\t// Vertex AI supports either an explicit API key or Application Default Credentials\n\t// Auth is configured via `gcloud auth application-default login`\n\tif (provider === \"google-vertex\") {\n\t\tif (process.env.GOOGLE_CLOUD_API_KEY) {\n\t\t\treturn process.env.GOOGLE_CLOUD_API_KEY;\n\t\t}\n\n\t\tconst hasCredentials = hasVertexAdcCredentials();\n\t\tconst hasProject = !!(process.env.GOOGLE_CLOUD_PROJECT || process.env.GCLOUD_PROJECT);\n\t\tconst hasLocation = !!process.env.GOOGLE_CLOUD_LOCATION;\n\n\t\tif (hasCredentials && hasProject && hasLocation) {\n\t\t\treturn \"<authenticated>\";\n\t\t}\n\t}\n\n\tif (provider === \"amazon-bedrock\") {\n\t\t// Amazon Bedrock supports multiple credential sources:\n\t\t// 1. AWS_PROFILE - named profile from ~/.aws/credentials\n\t\t// 2. AWS_ACCESS_KEY_ID + AWS_SECRET_ACCESS_KEY - standard IAM keys\n\t\t// 3. AWS_BEARER_TOKEN_BEDROCK - Bedrock API keys (bearer token)\n\t\t// 4. AWS_CONTAINER_CREDENTIALS_RELATIVE_URI - ECS task roles\n\t\t// 5. AWS_CONTAINER_CREDENTIALS_FULL_URI - ECS task roles (full URI)\n\t\t// 6. AWS_WEB_IDENTITY_TOKEN_FILE - IRSA (IAM Roles for Service Accounts)\n\t\tif (\n\t\t\tprocess.env.AWS_PROFILE ||\n\t\t\t(process.env.AWS_ACCESS_KEY_ID && process.env.AWS_SECRET_ACCESS_KEY) ||\n\t\t\tprocess.env.AWS_BEARER_TOKEN_BEDROCK ||\n\t\t\tprocess.env.AWS_CONTAINER_CREDENTIALS_RELATIVE_URI ||\n\t\t\tprocess.env.AWS_CONTAINER_CREDENTIALS_FULL_URI ||\n\t\t\tprocess.env.AWS_WEB_IDENTITY_TOKEN_FILE\n\t\t) {\n\t\t\treturn \"<authenticated>\";\n\t\t}\n\t}\n\n\tconst envMap: Record<string, string> = {\n\t\topenai: \"OPENAI_API_KEY\",\n\t\t\"azure-openai-responses\": \"AZURE_OPENAI_API_KEY\",\n\t\tgoogle: \"GEMINI_API_KEY\",\n\t\tgroq: \"GROQ_API_KEY\",\n\t\tcerebras: \"CEREBRAS_API_KEY\",\n\t\txai: \"XAI_API_KEY\",\n\t\topenrouter: \"OPENROUTER_API_KEY\",\n\t\t\"vercel-ai-gateway\": \"AI_GATEWAY_API_KEY\",\n\t\tzai: \"ZAI_API_KEY\",\n\t\tmistral: \"MISTRAL_API_KEY\",\n\t\tminimax: \"MINIMAX_API_KEY\",\n\t\t\"minimax-cn\": \"MINIMAX_CN_API_KEY\",\n\t\thuggingface: \"HF_TOKEN\",\n\t\topencode: \"OPENCODE_API_KEY\",\n\t\t\"opencode-go\": \"OPENCODE_API_KEY\",\n\t\t\"kimi-coding\": \"KIMI_API_KEY\",\n\t};\n\n\tconst envVar = envMap[provider];\n\treturn envVar ? process.env[envVar] : undefined;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"env-api-keys.d.ts","sourceRoot":"","sources":["../src/env-api-keys.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAgChD;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,aAAa,GAAG,MAAM,GAAG,SAAS,CAAC;AAC1E,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC","sourcesContent":["// NEVER convert to top-level imports - breaks browser/Vite builds (web-ui)\nlet _existsSync: typeof import(\"node:fs\").existsSync | null = null;\nlet _homedir: typeof import(\"node:os\").homedir | null = null;\nlet _join: typeof import(\"node:path\").join | null = null;\n\ntype DynamicImport = (specifier: string) => Promise<unknown>;\n\nconst dynamicImport: DynamicImport = (specifier) => import(specifier);\nconst NODE_FS_SPECIFIER = \"node:\" + \"fs\";\nconst NODE_OS_SPECIFIER = \"node:\" + \"os\";\nconst NODE_PATH_SPECIFIER = \"node:\" + \"path\";\n\n// Eagerly load in Node.js/Bun environment only\nif (typeof process !== \"undefined\" && (process.versions?.node || process.versions?.bun)) {\n\tdynamicImport(NODE_FS_SPECIFIER).then((m) => {\n\t\t_existsSync = (m as typeof import(\"node:fs\")).existsSync;\n\t});\n\tdynamicImport(NODE_OS_SPECIFIER).then((m) => {\n\t\t_homedir = (m as typeof import(\"node:os\")).homedir;\n\t});\n\tdynamicImport(NODE_PATH_SPECIFIER).then((m) => {\n\t\t_join = (m as typeof import(\"node:path\")).join;\n\t});\n}\n\nimport type { KnownProvider } from \"./types.js\";\n\nlet cachedVertexAdcCredentialsExists: boolean | null = null;\n\nfunction hasVertexAdcCredentials(): boolean {\n\tif (cachedVertexAdcCredentialsExists === null) {\n\t\t// If node modules haven't loaded yet (async import race at startup),\n\t\t// return false WITHOUT caching so the next call retries once they're ready.\n\t\t// Only cache false permanently in a browser environment where fs is never available.\n\t\tif (!_existsSync || !_homedir || !_join) {\n\t\t\tconst isNode = typeof process !== \"undefined\" && (process.versions?.node || process.versions?.bun);\n\t\t\tif (!isNode) {\n\t\t\t\t// Definitively in a browser — safe to cache false permanently\n\t\t\t\tcachedVertexAdcCredentialsExists = false;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\n\t\t// Check GOOGLE_APPLICATION_CREDENTIALS env var first (standard way)\n\t\tconst gacPath = process.env.GOOGLE_APPLICATION_CREDENTIALS;\n\t\tif (gacPath) {\n\t\t\tcachedVertexAdcCredentialsExists = _existsSync(gacPath);\n\t\t} else {\n\t\t\t// Fall back to default ADC path (lazy evaluation)\n\t\t\tcachedVertexAdcCredentialsExists = _existsSync(\n\t\t\t\t_join(_homedir(), \".config\", \"gcloud\", \"application_default_credentials.json\"),\n\t\t\t);\n\t\t}\n\t}\n\treturn cachedVertexAdcCredentialsExists;\n}\n\n/**\n * Get API key for provider from known environment variables, e.g. OPENAI_API_KEY.\n *\n * Will not return API keys for providers that require OAuth tokens.\n */\nexport function getEnvApiKey(provider: KnownProvider): string | undefined;\nexport function getEnvApiKey(provider: string): string | undefined;\nexport function getEnvApiKey(provider: any): string | undefined {\n\t// Fall back to environment variables\n\tif (provider === \"github-copilot\") {\n\t\treturn process.env.COPILOT_GITHUB_TOKEN || process.env.GH_TOKEN || process.env.GITHUB_TOKEN;\n\t}\n\n\t// ANTHROPIC_OAUTH_TOKEN takes precedence over ANTHROPIC_API_KEY\n\tif (provider === \"anthropic\") {\n\t\treturn process.env.ANTHROPIC_OAUTH_TOKEN || process.env.ANTHROPIC_API_KEY;\n\t}\n\n\t// Vertex AI supports either an explicit API key or Application Default Credentials\n\t// Auth is configured via `gcloud auth application-default login`\n\tif (provider === \"google-vertex\") {\n\t\tif (process.env.GOOGLE_CLOUD_API_KEY) {\n\t\t\treturn process.env.GOOGLE_CLOUD_API_KEY;\n\t\t}\n\n\t\tconst hasCredentials = hasVertexAdcCredentials();\n\t\tconst hasProject = !!(process.env.GOOGLE_CLOUD_PROJECT || process.env.GCLOUD_PROJECT);\n\t\tconst hasLocation = !!process.env.GOOGLE_CLOUD_LOCATION;\n\n\t\tif (hasCredentials && hasProject && hasLocation) {\n\t\t\treturn \"<authenticated>\";\n\t\t}\n\t}\n\n\tif (provider === \"amazon-bedrock\") {\n\t\t// Amazon Bedrock supports multiple credential sources:\n\t\t// 1. AWS_PROFILE - named profile from ~/.aws/credentials\n\t\t// 2. AWS_ACCESS_KEY_ID + AWS_SECRET_ACCESS_KEY - standard IAM keys\n\t\t// 3. AWS_BEARER_TOKEN_BEDROCK - Bedrock API keys (bearer token)\n\t\t// 4. AWS_CONTAINER_CREDENTIALS_RELATIVE_URI - ECS task roles\n\t\t// 5. AWS_CONTAINER_CREDENTIALS_FULL_URI - ECS task roles (full URI)\n\t\t// 6. AWS_WEB_IDENTITY_TOKEN_FILE - IRSA (IAM Roles for Service Accounts)\n\t\tif (\n\t\t\tprocess.env.AWS_PROFILE ||\n\t\t\t(process.env.AWS_ACCESS_KEY_ID && process.env.AWS_SECRET_ACCESS_KEY) ||\n\t\t\tprocess.env.AWS_BEARER_TOKEN_BEDROCK ||\n\t\t\tprocess.env.AWS_CONTAINER_CREDENTIALS_RELATIVE_URI ||\n\t\t\tprocess.env.AWS_CONTAINER_CREDENTIALS_FULL_URI ||\n\t\t\tprocess.env.AWS_WEB_IDENTITY_TOKEN_FILE\n\t\t) {\n\t\t\treturn \"<authenticated>\";\n\t\t}\n\t}\n\n\tconst envMap: Record<string, string> = {\n\t\topenai: \"OPENAI_API_KEY\",\n\t\t\"azure-openai-responses\": \"AZURE_OPENAI_API_KEY\",\n\t\tgoogle: \"GEMINI_API_KEY\",\n\t\tgroq: \"GROQ_API_KEY\",\n\t\tcerebras: \"CEREBRAS_API_KEY\",\n\t\txai: \"XAI_API_KEY\",\n\t\topenrouter: \"OPENROUTER_API_KEY\",\n\t\t\"vercel-ai-gateway\": \"AI_GATEWAY_API_KEY\",\n\t\tzai: \"ZAI_API_KEY\",\n\t\tmistral: \"MISTRAL_API_KEY\",\n\t\tminimax: \"MINIMAX_API_KEY\",\n\t\t\"minimax-cn\": \"MINIMAX_CN_API_KEY\",\n\t\thuggingface: \"HF_TOKEN\",\n\t\tfireworks: \"FIREWORKS_API_KEY\",\n\t\topencode: \"OPENCODE_API_KEY\",\n\t\t\"opencode-go\": \"OPENCODE_API_KEY\",\n\t\t\"kimi-coding\": \"KIMI_API_KEY\",\n\t};\n\n\tconst envVar = envMap[provider];\n\treturn envVar ? process.env[envVar] : undefined;\n}\n"]}
|
package/dist/env-api-keys.js
CHANGED
|
@@ -97,6 +97,7 @@ export function getEnvApiKey(provider) {
|
|
|
97
97
|
minimax: "MINIMAX_API_KEY",
|
|
98
98
|
"minimax-cn": "MINIMAX_CN_API_KEY",
|
|
99
99
|
huggingface: "HF_TOKEN",
|
|
100
|
+
fireworks: "FIREWORKS_API_KEY",
|
|
100
101
|
opencode: "OPENCODE_API_KEY",
|
|
101
102
|
"opencode-go": "OPENCODE_API_KEY",
|
|
102
103
|
"kimi-coding": "KIMI_API_KEY",
|
package/dist/env-api-keys.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env-api-keys.js","sourceRoot":"","sources":["../src/env-api-keys.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,IAAI,WAAW,GAA+C,IAA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AC;IAEF,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;IAChC,OAAO,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAAA,CAChD","sourcesContent":["// NEVER convert to top-level imports - breaks browser/Vite builds (web-ui)\nlet _existsSync: typeof import(\"node:fs\").existsSync | null = null;\nlet _homedir: typeof import(\"node:os\").homedir | null = null;\nlet _join: typeof import(\"node:path\").join | null = null;\n\ntype DynamicImport = (specifier: string) => Promise<unknown>;\n\nconst dynamicImport: DynamicImport = (specifier) => import(specifier);\nconst NODE_FS_SPECIFIER = \"node:\" + \"fs\";\nconst NODE_OS_SPECIFIER = \"node:\" + \"os\";\nconst NODE_PATH_SPECIFIER = \"node:\" + \"path\";\n\n// Eagerly load in Node.js/Bun environment only\nif (typeof process !== \"undefined\" && (process.versions?.node || process.versions?.bun)) {\n\tdynamicImport(NODE_FS_SPECIFIER).then((m) => {\n\t\t_existsSync = (m as typeof import(\"node:fs\")).existsSync;\n\t});\n\tdynamicImport(NODE_OS_SPECIFIER).then((m) => {\n\t\t_homedir = (m as typeof import(\"node:os\")).homedir;\n\t});\n\tdynamicImport(NODE_PATH_SPECIFIER).then((m) => {\n\t\t_join = (m as typeof import(\"node:path\")).join;\n\t});\n}\n\nimport type { KnownProvider } from \"./types.js\";\n\nlet cachedVertexAdcCredentialsExists: boolean | null = null;\n\nfunction hasVertexAdcCredentials(): boolean {\n\tif (cachedVertexAdcCredentialsExists === null) {\n\t\t// If node modules haven't loaded yet (async import race at startup),\n\t\t// return false WITHOUT caching so the next call retries once they're ready.\n\t\t// Only cache false permanently in a browser environment where fs is never available.\n\t\tif (!_existsSync || !_homedir || !_join) {\n\t\t\tconst isNode = typeof process !== \"undefined\" && (process.versions?.node || process.versions?.bun);\n\t\t\tif (!isNode) {\n\t\t\t\t// Definitively in a browser — safe to cache false permanently\n\t\t\t\tcachedVertexAdcCredentialsExists = false;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\n\t\t// Check GOOGLE_APPLICATION_CREDENTIALS env var first (standard way)\n\t\tconst gacPath = process.env.GOOGLE_APPLICATION_CREDENTIALS;\n\t\tif (gacPath) {\n\t\t\tcachedVertexAdcCredentialsExists = _existsSync(gacPath);\n\t\t} else {\n\t\t\t// Fall back to default ADC path (lazy evaluation)\n\t\t\tcachedVertexAdcCredentialsExists = _existsSync(\n\t\t\t\t_join(_homedir(), \".config\", \"gcloud\", \"application_default_credentials.json\"),\n\t\t\t);\n\t\t}\n\t}\n\treturn cachedVertexAdcCredentialsExists;\n}\n\n/**\n * Get API key for provider from known environment variables, e.g. OPENAI_API_KEY.\n *\n * Will not return API keys for providers that require OAuth tokens.\n */\nexport function getEnvApiKey(provider: KnownProvider): string | undefined;\nexport function getEnvApiKey(provider: string): string | undefined;\nexport function getEnvApiKey(provider: any): string | undefined {\n\t// Fall back to environment variables\n\tif (provider === \"github-copilot\") {\n\t\treturn process.env.COPILOT_GITHUB_TOKEN || process.env.GH_TOKEN || process.env.GITHUB_TOKEN;\n\t}\n\n\t// ANTHROPIC_OAUTH_TOKEN takes precedence over ANTHROPIC_API_KEY\n\tif (provider === \"anthropic\") {\n\t\treturn process.env.ANTHROPIC_OAUTH_TOKEN || process.env.ANTHROPIC_API_KEY;\n\t}\n\n\t// Vertex AI supports either an explicit API key or Application Default Credentials\n\t// Auth is configured via `gcloud auth application-default login`\n\tif (provider === \"google-vertex\") {\n\t\tif (process.env.GOOGLE_CLOUD_API_KEY) {\n\t\t\treturn process.env.GOOGLE_CLOUD_API_KEY;\n\t\t}\n\n\t\tconst hasCredentials = hasVertexAdcCredentials();\n\t\tconst hasProject = !!(process.env.GOOGLE_CLOUD_PROJECT || process.env.GCLOUD_PROJECT);\n\t\tconst hasLocation = !!process.env.GOOGLE_CLOUD_LOCATION;\n\n\t\tif (hasCredentials && hasProject && hasLocation) {\n\t\t\treturn \"<authenticated>\";\n\t\t}\n\t}\n\n\tif (provider === \"amazon-bedrock\") {\n\t\t// Amazon Bedrock supports multiple credential sources:\n\t\t// 1. AWS_PROFILE - named profile from ~/.aws/credentials\n\t\t// 2. AWS_ACCESS_KEY_ID + AWS_SECRET_ACCESS_KEY - standard IAM keys\n\t\t// 3. AWS_BEARER_TOKEN_BEDROCK - Bedrock API keys (bearer token)\n\t\t// 4. AWS_CONTAINER_CREDENTIALS_RELATIVE_URI - ECS task roles\n\t\t// 5. AWS_CONTAINER_CREDENTIALS_FULL_URI - ECS task roles (full URI)\n\t\t// 6. AWS_WEB_IDENTITY_TOKEN_FILE - IRSA (IAM Roles for Service Accounts)\n\t\tif (\n\t\t\tprocess.env.AWS_PROFILE ||\n\t\t\t(process.env.AWS_ACCESS_KEY_ID && process.env.AWS_SECRET_ACCESS_KEY) ||\n\t\t\tprocess.env.AWS_BEARER_TOKEN_BEDROCK ||\n\t\t\tprocess.env.AWS_CONTAINER_CREDENTIALS_RELATIVE_URI ||\n\t\t\tprocess.env.AWS_CONTAINER_CREDENTIALS_FULL_URI ||\n\t\t\tprocess.env.AWS_WEB_IDENTITY_TOKEN_FILE\n\t\t) {\n\t\t\treturn \"<authenticated>\";\n\t\t}\n\t}\n\n\tconst envMap: Record<string, string> = {\n\t\topenai: \"OPENAI_API_KEY\",\n\t\t\"azure-openai-responses\": \"AZURE_OPENAI_API_KEY\",\n\t\tgoogle: \"GEMINI_API_KEY\",\n\t\tgroq: \"GROQ_API_KEY\",\n\t\tcerebras: \"CEREBRAS_API_KEY\",\n\t\txai: \"XAI_API_KEY\",\n\t\topenrouter: \"OPENROUTER_API_KEY\",\n\t\t\"vercel-ai-gateway\": \"AI_GATEWAY_API_KEY\",\n\t\tzai: \"ZAI_API_KEY\",\n\t\tmistral: \"MISTRAL_API_KEY\",\n\t\tminimax: \"MINIMAX_API_KEY\",\n\t\t\"minimax-cn\": \"MINIMAX_CN_API_KEY\",\n\t\thuggingface: \"HF_TOKEN\",\n\t\topencode: \"OPENCODE_API_KEY\",\n\t\t\"opencode-go\": \"OPENCODE_API_KEY\",\n\t\t\"kimi-coding\": \"KIMI_API_KEY\",\n\t};\n\n\tconst envVar = envMap[provider];\n\treturn envVar ? process.env[envVar] : undefined;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"env-api-keys.js","sourceRoot":"","sources":["../src/env-api-keys.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,IAAI,WAAW,GAA+C,IAAI,CAAC;AACnE,IAAI,QAAQ,GAA4C,IAAI,CAAC;AAC7D,IAAI,KAAK,GAA2C,IAAI,CAAC;AAIzD,MAAM,aAAa,GAAkB,CAAC,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;AACtE,MAAM,iBAAiB,GAAG,OAAO,GAAG,IAAI,CAAC;AACzC,MAAM,iBAAiB,GAAG,OAAO,GAAG,IAAI,CAAC;AACzC,MAAM,mBAAmB,GAAG,OAAO,GAAG,MAAM,CAAC;AAE7C,+CAA+C;AAC/C,IAAI,OAAO,OAAO,KAAK,WAAW,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,IAAI,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC,EAAE,CAAC;IACzF,aAAa,CAAC,iBAAiB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;QAC5C,WAAW,GAAI,CAA8B,CAAC,UAAU,CAAC;IAAA,CACzD,CAAC,CAAC;IACH,aAAa,CAAC,iBAAiB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;QAC5C,QAAQ,GAAI,CAA8B,CAAC,OAAO,CAAC;IAAA,CACnD,CAAC,CAAC;IACH,aAAa,CAAC,mBAAmB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;QAC9C,KAAK,GAAI,CAAgC,CAAC,IAAI,CAAC;IAAA,CAC/C,CAAC,CAAC;AACJ,CAAC;AAID,IAAI,gCAAgC,GAAm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AClB,UAAU,EAAE,oBAAoB;QAChC,mBAAmB,EAAE,oBAAoB;QACzC,GAAG,EAAE,aAAa;QAClB,OAAO,EAAE,iBAAiB;QAC1B,OAAO,EAAE,iBAAiB;QAC1B,YAAY,EAAE,oBAAoB;QAClC,WAAW,EAAE,UAAU;QACvB,SAAS,EAAE,mBAAmB;QAC9B,QAAQ,EAAE,kBAAkB;QAC5B,aAAa,EAAE,kBAAkB;QACjC,aAAa,EAAE,cAAc;KAC7B,CAAC;IAEF,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;IAChC,OAAO,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAAA,CAChD","sourcesContent":["// NEVER convert to top-level imports - breaks browser/Vite builds (web-ui)\nlet _existsSync: typeof import(\"node:fs\").existsSync | null = null;\nlet _homedir: typeof import(\"node:os\").homedir | null = null;\nlet _join: typeof import(\"node:path\").join | null = null;\n\ntype DynamicImport = (specifier: string) => Promise<unknown>;\n\nconst dynamicImport: DynamicImport = (specifier) => import(specifier);\nconst NODE_FS_SPECIFIER = \"node:\" + \"fs\";\nconst NODE_OS_SPECIFIER = \"node:\" + \"os\";\nconst NODE_PATH_SPECIFIER = \"node:\" + \"path\";\n\n// Eagerly load in Node.js/Bun environment only\nif (typeof process !== \"undefined\" && (process.versions?.node || process.versions?.bun)) {\n\tdynamicImport(NODE_FS_SPECIFIER).then((m) => {\n\t\t_existsSync = (m as typeof import(\"node:fs\")).existsSync;\n\t});\n\tdynamicImport(NODE_OS_SPECIFIER).then((m) => {\n\t\t_homedir = (m as typeof import(\"node:os\")).homedir;\n\t});\n\tdynamicImport(NODE_PATH_SPECIFIER).then((m) => {\n\t\t_join = (m as typeof import(\"node:path\")).join;\n\t});\n}\n\nimport type { KnownProvider } from \"./types.js\";\n\nlet cachedVertexAdcCredentialsExists: boolean | null = null;\n\nfunction hasVertexAdcCredentials(): boolean {\n\tif (cachedVertexAdcCredentialsExists === null) {\n\t\t// If node modules haven't loaded yet (async import race at startup),\n\t\t// return false WITHOUT caching so the next call retries once they're ready.\n\t\t// Only cache false permanently in a browser environment where fs is never available.\n\t\tif (!_existsSync || !_homedir || !_join) {\n\t\t\tconst isNode = typeof process !== \"undefined\" && (process.versions?.node || process.versions?.bun);\n\t\t\tif (!isNode) {\n\t\t\t\t// Definitively in a browser — safe to cache false permanently\n\t\t\t\tcachedVertexAdcCredentialsExists = false;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\n\t\t// Check GOOGLE_APPLICATION_CREDENTIALS env var first (standard way)\n\t\tconst gacPath = process.env.GOOGLE_APPLICATION_CREDENTIALS;\n\t\tif (gacPath) {\n\t\t\tcachedVertexAdcCredentialsExists = _existsSync(gacPath);\n\t\t} else {\n\t\t\t// Fall back to default ADC path (lazy evaluation)\n\t\t\tcachedVertexAdcCredentialsExists = _existsSync(\n\t\t\t\t_join(_homedir(), \".config\", \"gcloud\", \"application_default_credentials.json\"),\n\t\t\t);\n\t\t}\n\t}\n\treturn cachedVertexAdcCredentialsExists;\n}\n\n/**\n * Get API key for provider from known environment variables, e.g. OPENAI_API_KEY.\n *\n * Will not return API keys for providers that require OAuth tokens.\n */\nexport function getEnvApiKey(provider: KnownProvider): string | undefined;\nexport function getEnvApiKey(provider: string): string | undefined;\nexport function getEnvApiKey(provider: any): string | undefined {\n\t// Fall back to environment variables\n\tif (provider === \"github-copilot\") {\n\t\treturn process.env.COPILOT_GITHUB_TOKEN || process.env.GH_TOKEN || process.env.GITHUB_TOKEN;\n\t}\n\n\t// ANTHROPIC_OAUTH_TOKEN takes precedence over ANTHROPIC_API_KEY\n\tif (provider === \"anthropic\") {\n\t\treturn process.env.ANTHROPIC_OAUTH_TOKEN || process.env.ANTHROPIC_API_KEY;\n\t}\n\n\t// Vertex AI supports either an explicit API key or Application Default Credentials\n\t// Auth is configured via `gcloud auth application-default login`\n\tif (provider === \"google-vertex\") {\n\t\tif (process.env.GOOGLE_CLOUD_API_KEY) {\n\t\t\treturn process.env.GOOGLE_CLOUD_API_KEY;\n\t\t}\n\n\t\tconst hasCredentials = hasVertexAdcCredentials();\n\t\tconst hasProject = !!(process.env.GOOGLE_CLOUD_PROJECT || process.env.GCLOUD_PROJECT);\n\t\tconst hasLocation = !!process.env.GOOGLE_CLOUD_LOCATION;\n\n\t\tif (hasCredentials && hasProject && hasLocation) {\n\t\t\treturn \"<authenticated>\";\n\t\t}\n\t}\n\n\tif (provider === \"amazon-bedrock\") {\n\t\t// Amazon Bedrock supports multiple credential sources:\n\t\t// 1. AWS_PROFILE - named profile from ~/.aws/credentials\n\t\t// 2. AWS_ACCESS_KEY_ID + AWS_SECRET_ACCESS_KEY - standard IAM keys\n\t\t// 3. AWS_BEARER_TOKEN_BEDROCK - Bedrock API keys (bearer token)\n\t\t// 4. AWS_CONTAINER_CREDENTIALS_RELATIVE_URI - ECS task roles\n\t\t// 5. AWS_CONTAINER_CREDENTIALS_FULL_URI - ECS task roles (full URI)\n\t\t// 6. AWS_WEB_IDENTITY_TOKEN_FILE - IRSA (IAM Roles for Service Accounts)\n\t\tif (\n\t\t\tprocess.env.AWS_PROFILE ||\n\t\t\t(process.env.AWS_ACCESS_KEY_ID && process.env.AWS_SECRET_ACCESS_KEY) ||\n\t\t\tprocess.env.AWS_BEARER_TOKEN_BEDROCK ||\n\t\t\tprocess.env.AWS_CONTAINER_CREDENTIALS_RELATIVE_URI ||\n\t\t\tprocess.env.AWS_CONTAINER_CREDENTIALS_FULL_URI ||\n\t\t\tprocess.env.AWS_WEB_IDENTITY_TOKEN_FILE\n\t\t) {\n\t\t\treturn \"<authenticated>\";\n\t\t}\n\t}\n\n\tconst envMap: Record<string, string> = {\n\t\topenai: \"OPENAI_API_KEY\",\n\t\t\"azure-openai-responses\": \"AZURE_OPENAI_API_KEY\",\n\t\tgoogle: \"GEMINI_API_KEY\",\n\t\tgroq: \"GROQ_API_KEY\",\n\t\tcerebras: \"CEREBRAS_API_KEY\",\n\t\txai: \"XAI_API_KEY\",\n\t\topenrouter: \"OPENROUTER_API_KEY\",\n\t\t\"vercel-ai-gateway\": \"AI_GATEWAY_API_KEY\",\n\t\tzai: \"ZAI_API_KEY\",\n\t\tmistral: \"MISTRAL_API_KEY\",\n\t\tminimax: \"MINIMAX_API_KEY\",\n\t\t\"minimax-cn\": \"MINIMAX_CN_API_KEY\",\n\t\thuggingface: \"HF_TOKEN\",\n\t\tfireworks: \"FIREWORKS_API_KEY\",\n\t\topencode: \"OPENCODE_API_KEY\",\n\t\t\"opencode-go\": \"OPENCODE_API_KEY\",\n\t\t\"kimi-coding\": \"KIMI_API_KEY\",\n\t};\n\n\tconst envVar = envMap[provider];\n\treturn envVar ? process.env[envVar] : undefined;\n}\n"]}
|
|
@@ -2693,6 +2693,314 @@ export declare const MODELS: {
|
|
|
2693
2693
|
maxTokens: number;
|
|
2694
2694
|
};
|
|
2695
2695
|
};
|
|
2696
|
+
readonly fireworks: {
|
|
2697
|
+
readonly "accounts/fireworks/models/deepseek-v3p1": {
|
|
2698
|
+
id: string;
|
|
2699
|
+
name: string;
|
|
2700
|
+
api: "anthropic-messages";
|
|
2701
|
+
provider: string;
|
|
2702
|
+
baseUrl: string;
|
|
2703
|
+
reasoning: true;
|
|
2704
|
+
input: "text"[];
|
|
2705
|
+
cost: {
|
|
2706
|
+
input: number;
|
|
2707
|
+
output: number;
|
|
2708
|
+
cacheRead: number;
|
|
2709
|
+
cacheWrite: number;
|
|
2710
|
+
};
|
|
2711
|
+
contextWindow: number;
|
|
2712
|
+
maxTokens: number;
|
|
2713
|
+
};
|
|
2714
|
+
readonly "accounts/fireworks/models/deepseek-v3p2": {
|
|
2715
|
+
id: string;
|
|
2716
|
+
name: string;
|
|
2717
|
+
api: "anthropic-messages";
|
|
2718
|
+
provider: string;
|
|
2719
|
+
baseUrl: string;
|
|
2720
|
+
reasoning: true;
|
|
2721
|
+
input: "text"[];
|
|
2722
|
+
cost: {
|
|
2723
|
+
input: number;
|
|
2724
|
+
output: number;
|
|
2725
|
+
cacheRead: number;
|
|
2726
|
+
cacheWrite: number;
|
|
2727
|
+
};
|
|
2728
|
+
contextWindow: number;
|
|
2729
|
+
maxTokens: number;
|
|
2730
|
+
};
|
|
2731
|
+
readonly "accounts/fireworks/models/glm-4p5": {
|
|
2732
|
+
id: string;
|
|
2733
|
+
name: string;
|
|
2734
|
+
api: "anthropic-messages";
|
|
2735
|
+
provider: string;
|
|
2736
|
+
baseUrl: string;
|
|
2737
|
+
reasoning: true;
|
|
2738
|
+
input: "text"[];
|
|
2739
|
+
cost: {
|
|
2740
|
+
input: number;
|
|
2741
|
+
output: number;
|
|
2742
|
+
cacheRead: number;
|
|
2743
|
+
cacheWrite: number;
|
|
2744
|
+
};
|
|
2745
|
+
contextWindow: number;
|
|
2746
|
+
maxTokens: number;
|
|
2747
|
+
};
|
|
2748
|
+
readonly "accounts/fireworks/models/glm-4p5-air": {
|
|
2749
|
+
id: string;
|
|
2750
|
+
name: string;
|
|
2751
|
+
api: "anthropic-messages";
|
|
2752
|
+
provider: string;
|
|
2753
|
+
baseUrl: string;
|
|
2754
|
+
reasoning: true;
|
|
2755
|
+
input: "text"[];
|
|
2756
|
+
cost: {
|
|
2757
|
+
input: number;
|
|
2758
|
+
output: number;
|
|
2759
|
+
cacheRead: number;
|
|
2760
|
+
cacheWrite: number;
|
|
2761
|
+
};
|
|
2762
|
+
contextWindow: number;
|
|
2763
|
+
maxTokens: number;
|
|
2764
|
+
};
|
|
2765
|
+
readonly "accounts/fireworks/models/glm-4p7": {
|
|
2766
|
+
id: string;
|
|
2767
|
+
name: string;
|
|
2768
|
+
api: "anthropic-messages";
|
|
2769
|
+
provider: string;
|
|
2770
|
+
baseUrl: string;
|
|
2771
|
+
reasoning: true;
|
|
2772
|
+
input: "text"[];
|
|
2773
|
+
cost: {
|
|
2774
|
+
input: number;
|
|
2775
|
+
output: number;
|
|
2776
|
+
cacheRead: number;
|
|
2777
|
+
cacheWrite: number;
|
|
2778
|
+
};
|
|
2779
|
+
contextWindow: number;
|
|
2780
|
+
maxTokens: number;
|
|
2781
|
+
};
|
|
2782
|
+
readonly "accounts/fireworks/models/glm-5": {
|
|
2783
|
+
id: string;
|
|
2784
|
+
name: string;
|
|
2785
|
+
api: "anthropic-messages";
|
|
2786
|
+
provider: string;
|
|
2787
|
+
baseUrl: string;
|
|
2788
|
+
reasoning: true;
|
|
2789
|
+
input: "text"[];
|
|
2790
|
+
cost: {
|
|
2791
|
+
input: number;
|
|
2792
|
+
output: number;
|
|
2793
|
+
cacheRead: number;
|
|
2794
|
+
cacheWrite: number;
|
|
2795
|
+
};
|
|
2796
|
+
contextWindow: number;
|
|
2797
|
+
maxTokens: number;
|
|
2798
|
+
};
|
|
2799
|
+
readonly "accounts/fireworks/models/glm-5p1": {
|
|
2800
|
+
id: string;
|
|
2801
|
+
name: string;
|
|
2802
|
+
api: "anthropic-messages";
|
|
2803
|
+
provider: string;
|
|
2804
|
+
baseUrl: string;
|
|
2805
|
+
reasoning: true;
|
|
2806
|
+
input: "text"[];
|
|
2807
|
+
cost: {
|
|
2808
|
+
input: number;
|
|
2809
|
+
output: number;
|
|
2810
|
+
cacheRead: number;
|
|
2811
|
+
cacheWrite: number;
|
|
2812
|
+
};
|
|
2813
|
+
contextWindow: number;
|
|
2814
|
+
maxTokens: number;
|
|
2815
|
+
};
|
|
2816
|
+
readonly "accounts/fireworks/models/gpt-oss-120b": {
|
|
2817
|
+
id: string;
|
|
2818
|
+
name: string;
|
|
2819
|
+
api: "anthropic-messages";
|
|
2820
|
+
provider: string;
|
|
2821
|
+
baseUrl: string;
|
|
2822
|
+
reasoning: true;
|
|
2823
|
+
input: "text"[];
|
|
2824
|
+
cost: {
|
|
2825
|
+
input: number;
|
|
2826
|
+
output: number;
|
|
2827
|
+
cacheRead: number;
|
|
2828
|
+
cacheWrite: number;
|
|
2829
|
+
};
|
|
2830
|
+
contextWindow: number;
|
|
2831
|
+
maxTokens: number;
|
|
2832
|
+
};
|
|
2833
|
+
readonly "accounts/fireworks/models/gpt-oss-20b": {
|
|
2834
|
+
id: string;
|
|
2835
|
+
name: string;
|
|
2836
|
+
api: "anthropic-messages";
|
|
2837
|
+
provider: string;
|
|
2838
|
+
baseUrl: string;
|
|
2839
|
+
reasoning: true;
|
|
2840
|
+
input: "text"[];
|
|
2841
|
+
cost: {
|
|
2842
|
+
input: number;
|
|
2843
|
+
output: number;
|
|
2844
|
+
cacheRead: number;
|
|
2845
|
+
cacheWrite: number;
|
|
2846
|
+
};
|
|
2847
|
+
contextWindow: number;
|
|
2848
|
+
maxTokens: number;
|
|
2849
|
+
};
|
|
2850
|
+
readonly "accounts/fireworks/models/kimi-k2-instruct": {
|
|
2851
|
+
id: string;
|
|
2852
|
+
name: string;
|
|
2853
|
+
api: "anthropic-messages";
|
|
2854
|
+
provider: string;
|
|
2855
|
+
baseUrl: string;
|
|
2856
|
+
reasoning: false;
|
|
2857
|
+
input: "text"[];
|
|
2858
|
+
cost: {
|
|
2859
|
+
input: number;
|
|
2860
|
+
output: number;
|
|
2861
|
+
cacheRead: number;
|
|
2862
|
+
cacheWrite: number;
|
|
2863
|
+
};
|
|
2864
|
+
contextWindow: number;
|
|
2865
|
+
maxTokens: number;
|
|
2866
|
+
};
|
|
2867
|
+
readonly "accounts/fireworks/models/kimi-k2-thinking": {
|
|
2868
|
+
id: string;
|
|
2869
|
+
name: string;
|
|
2870
|
+
api: "anthropic-messages";
|
|
2871
|
+
provider: string;
|
|
2872
|
+
baseUrl: string;
|
|
2873
|
+
reasoning: true;
|
|
2874
|
+
input: "text"[];
|
|
2875
|
+
cost: {
|
|
2876
|
+
input: number;
|
|
2877
|
+
output: number;
|
|
2878
|
+
cacheRead: number;
|
|
2879
|
+
cacheWrite: number;
|
|
2880
|
+
};
|
|
2881
|
+
contextWindow: number;
|
|
2882
|
+
maxTokens: number;
|
|
2883
|
+
};
|
|
2884
|
+
readonly "accounts/fireworks/models/kimi-k2p5": {
|
|
2885
|
+
id: string;
|
|
2886
|
+
name: string;
|
|
2887
|
+
api: "anthropic-messages";
|
|
2888
|
+
provider: string;
|
|
2889
|
+
baseUrl: string;
|
|
2890
|
+
reasoning: true;
|
|
2891
|
+
input: ("image" | "text")[];
|
|
2892
|
+
cost: {
|
|
2893
|
+
input: number;
|
|
2894
|
+
output: number;
|
|
2895
|
+
cacheRead: number;
|
|
2896
|
+
cacheWrite: number;
|
|
2897
|
+
};
|
|
2898
|
+
contextWindow: number;
|
|
2899
|
+
maxTokens: number;
|
|
2900
|
+
};
|
|
2901
|
+
readonly "accounts/fireworks/models/kimi-k2p6": {
|
|
2902
|
+
id: string;
|
|
2903
|
+
name: string;
|
|
2904
|
+
api: "anthropic-messages";
|
|
2905
|
+
provider: string;
|
|
2906
|
+
baseUrl: string;
|
|
2907
|
+
reasoning: true;
|
|
2908
|
+
input: ("image" | "text")[];
|
|
2909
|
+
cost: {
|
|
2910
|
+
input: number;
|
|
2911
|
+
output: number;
|
|
2912
|
+
cacheRead: number;
|
|
2913
|
+
cacheWrite: number;
|
|
2914
|
+
};
|
|
2915
|
+
contextWindow: number;
|
|
2916
|
+
maxTokens: number;
|
|
2917
|
+
};
|
|
2918
|
+
readonly "accounts/fireworks/models/minimax-m2p1": {
|
|
2919
|
+
id: string;
|
|
2920
|
+
name: string;
|
|
2921
|
+
api: "anthropic-messages";
|
|
2922
|
+
provider: string;
|
|
2923
|
+
baseUrl: string;
|
|
2924
|
+
reasoning: true;
|
|
2925
|
+
input: "text"[];
|
|
2926
|
+
cost: {
|
|
2927
|
+
input: number;
|
|
2928
|
+
output: number;
|
|
2929
|
+
cacheRead: number;
|
|
2930
|
+
cacheWrite: number;
|
|
2931
|
+
};
|
|
2932
|
+
contextWindow: number;
|
|
2933
|
+
maxTokens: number;
|
|
2934
|
+
};
|
|
2935
|
+
readonly "accounts/fireworks/models/minimax-m2p5": {
|
|
2936
|
+
id: string;
|
|
2937
|
+
name: string;
|
|
2938
|
+
api: "anthropic-messages";
|
|
2939
|
+
provider: string;
|
|
2940
|
+
baseUrl: string;
|
|
2941
|
+
reasoning: true;
|
|
2942
|
+
input: "text"[];
|
|
2943
|
+
cost: {
|
|
2944
|
+
input: number;
|
|
2945
|
+
output: number;
|
|
2946
|
+
cacheRead: number;
|
|
2947
|
+
cacheWrite: number;
|
|
2948
|
+
};
|
|
2949
|
+
contextWindow: number;
|
|
2950
|
+
maxTokens: number;
|
|
2951
|
+
};
|
|
2952
|
+
readonly "accounts/fireworks/models/minimax-m2p7": {
|
|
2953
|
+
id: string;
|
|
2954
|
+
name: string;
|
|
2955
|
+
api: "anthropic-messages";
|
|
2956
|
+
provider: string;
|
|
2957
|
+
baseUrl: string;
|
|
2958
|
+
reasoning: true;
|
|
2959
|
+
input: "text"[];
|
|
2960
|
+
cost: {
|
|
2961
|
+
input: number;
|
|
2962
|
+
output: number;
|
|
2963
|
+
cacheRead: number;
|
|
2964
|
+
cacheWrite: number;
|
|
2965
|
+
};
|
|
2966
|
+
contextWindow: number;
|
|
2967
|
+
maxTokens: number;
|
|
2968
|
+
};
|
|
2969
|
+
readonly "accounts/fireworks/models/qwen3p6-plus": {
|
|
2970
|
+
id: string;
|
|
2971
|
+
name: string;
|
|
2972
|
+
api: "anthropic-messages";
|
|
2973
|
+
provider: string;
|
|
2974
|
+
baseUrl: string;
|
|
2975
|
+
reasoning: true;
|
|
2976
|
+
input: ("image" | "text")[];
|
|
2977
|
+
cost: {
|
|
2978
|
+
input: number;
|
|
2979
|
+
output: number;
|
|
2980
|
+
cacheRead: number;
|
|
2981
|
+
cacheWrite: number;
|
|
2982
|
+
};
|
|
2983
|
+
contextWindow: number;
|
|
2984
|
+
maxTokens: number;
|
|
2985
|
+
};
|
|
2986
|
+
readonly "accounts/fireworks/routers/kimi-k2p5-turbo": {
|
|
2987
|
+
id: string;
|
|
2988
|
+
name: string;
|
|
2989
|
+
api: "anthropic-messages";
|
|
2990
|
+
provider: string;
|
|
2991
|
+
baseUrl: string;
|
|
2992
|
+
reasoning: true;
|
|
2993
|
+
input: ("image" | "text")[];
|
|
2994
|
+
cost: {
|
|
2995
|
+
input: number;
|
|
2996
|
+
output: number;
|
|
2997
|
+
cacheRead: number;
|
|
2998
|
+
cacheWrite: number;
|
|
2999
|
+
};
|
|
3000
|
+
contextWindow: number;
|
|
3001
|
+
maxTokens: number;
|
|
3002
|
+
};
|
|
3003
|
+
};
|
|
2696
3004
|
readonly "github-copilot": {
|
|
2697
3005
|
readonly "claude-haiku-4.5": {
|
|
2698
3006
|
id: string;
|
|
@@ -4877,6 +5185,26 @@ export declare const MODELS: {
|
|
|
4877
5185
|
contextWindow: number;
|
|
4878
5186
|
maxTokens: number;
|
|
4879
5187
|
};
|
|
5188
|
+
readonly "moonshotai/Kimi-K2.6": {
|
|
5189
|
+
id: string;
|
|
5190
|
+
name: string;
|
|
5191
|
+
api: "openai-completions";
|
|
5192
|
+
provider: string;
|
|
5193
|
+
baseUrl: string;
|
|
5194
|
+
compat: {
|
|
5195
|
+
supportsDeveloperRole: false;
|
|
5196
|
+
};
|
|
5197
|
+
reasoning: true;
|
|
5198
|
+
input: ("image" | "text")[];
|
|
5199
|
+
cost: {
|
|
5200
|
+
input: number;
|
|
5201
|
+
output: number;
|
|
5202
|
+
cacheRead: number;
|
|
5203
|
+
cacheWrite: number;
|
|
5204
|
+
};
|
|
5205
|
+
contextWindow: number;
|
|
5206
|
+
maxTokens: number;
|
|
5207
|
+
};
|
|
4880
5208
|
readonly "zai-org/GLM-4.7": {
|
|
4881
5209
|
id: string;
|
|
4882
5210
|
name: string;
|
|
@@ -4959,6 +5287,23 @@ export declare const MODELS: {
|
|
|
4959
5287
|
};
|
|
4960
5288
|
};
|
|
4961
5289
|
readonly "kimi-coding": {
|
|
5290
|
+
readonly k2p6: {
|
|
5291
|
+
id: string;
|
|
5292
|
+
name: string;
|
|
5293
|
+
api: "anthropic-messages";
|
|
5294
|
+
provider: string;
|
|
5295
|
+
baseUrl: string;
|
|
5296
|
+
reasoning: true;
|
|
5297
|
+
input: ("image" | "text")[];
|
|
5298
|
+
cost: {
|
|
5299
|
+
input: number;
|
|
5300
|
+
output: number;
|
|
5301
|
+
cacheRead: number;
|
|
5302
|
+
cacheWrite: number;
|
|
5303
|
+
};
|
|
5304
|
+
contextWindow: number;
|
|
5305
|
+
maxTokens: number;
|
|
5306
|
+
};
|
|
4962
5307
|
readonly "kimi-for-coding": {
|
|
4963
5308
|
id: string;
|
|
4964
5309
|
name: string;
|
|
@@ -6841,6 +7186,40 @@ export declare const MODELS: {
|
|
|
6841
7186
|
contextWindow: number;
|
|
6842
7187
|
maxTokens: number;
|
|
6843
7188
|
};
|
|
7189
|
+
readonly "kimi-k2.6": {
|
|
7190
|
+
id: string;
|
|
7191
|
+
name: string;
|
|
7192
|
+
api: "openai-completions";
|
|
7193
|
+
provider: string;
|
|
7194
|
+
baseUrl: string;
|
|
7195
|
+
reasoning: true;
|
|
7196
|
+
input: ("image" | "text")[];
|
|
7197
|
+
cost: {
|
|
7198
|
+
input: number;
|
|
7199
|
+
output: number;
|
|
7200
|
+
cacheRead: number;
|
|
7201
|
+
cacheWrite: number;
|
|
7202
|
+
};
|
|
7203
|
+
contextWindow: number;
|
|
7204
|
+
maxTokens: number;
|
|
7205
|
+
};
|
|
7206
|
+
readonly "ling-2.6-flash-free": {
|
|
7207
|
+
id: string;
|
|
7208
|
+
name: string;
|
|
7209
|
+
api: "openai-completions";
|
|
7210
|
+
provider: string;
|
|
7211
|
+
baseUrl: string;
|
|
7212
|
+
reasoning: false;
|
|
7213
|
+
input: "text"[];
|
|
7214
|
+
cost: {
|
|
7215
|
+
input: number;
|
|
7216
|
+
output: number;
|
|
7217
|
+
cacheRead: number;
|
|
7218
|
+
cacheWrite: number;
|
|
7219
|
+
};
|
|
7220
|
+
contextWindow: number;
|
|
7221
|
+
maxTokens: number;
|
|
7222
|
+
};
|
|
6844
7223
|
readonly "minimax-m2.5": {
|
|
6845
7224
|
id: string;
|
|
6846
7225
|
name: string;
|
|
@@ -6875,6 +7254,23 @@ export declare const MODELS: {
|
|
|
6875
7254
|
contextWindow: number;
|
|
6876
7255
|
maxTokens: number;
|
|
6877
7256
|
};
|
|
7257
|
+
readonly "minimax-m2.7": {
|
|
7258
|
+
id: string;
|
|
7259
|
+
name: string;
|
|
7260
|
+
api: "openai-completions";
|
|
7261
|
+
provider: string;
|
|
7262
|
+
baseUrl: string;
|
|
7263
|
+
reasoning: true;
|
|
7264
|
+
input: "text"[];
|
|
7265
|
+
cost: {
|
|
7266
|
+
input: number;
|
|
7267
|
+
output: number;
|
|
7268
|
+
cacheRead: number;
|
|
7269
|
+
cacheWrite: number;
|
|
7270
|
+
};
|
|
7271
|
+
contextWindow: number;
|
|
7272
|
+
maxTokens: number;
|
|
7273
|
+
};
|
|
6878
7274
|
readonly "nemotron-3-super-free": {
|
|
6879
7275
|
id: string;
|
|
6880
7276
|
name: string;
|
|
@@ -8149,6 +8545,23 @@ export declare const MODELS: {
|
|
|
8149
8545
|
contextWindow: number;
|
|
8150
8546
|
maxTokens: number;
|
|
8151
8547
|
};
|
|
8548
|
+
readonly "inclusionai/ling-2.6-flash:free": {
|
|
8549
|
+
id: string;
|
|
8550
|
+
name: string;
|
|
8551
|
+
api: "openai-completions";
|
|
8552
|
+
provider: string;
|
|
8553
|
+
baseUrl: string;
|
|
8554
|
+
reasoning: false;
|
|
8555
|
+
input: "text"[];
|
|
8556
|
+
cost: {
|
|
8557
|
+
input: number;
|
|
8558
|
+
output: number;
|
|
8559
|
+
cacheRead: number;
|
|
8560
|
+
cacheWrite: number;
|
|
8561
|
+
};
|
|
8562
|
+
contextWindow: number;
|
|
8563
|
+
maxTokens: number;
|
|
8564
|
+
};
|
|
8152
8565
|
readonly "kwaipilot/kat-coder-pro-v2": {
|
|
8153
8566
|
id: string;
|
|
8154
8567
|
name: string;
|
|
@@ -9339,40 +9752,6 @@ export declare const MODELS: {
|
|
|
9339
9752
|
contextWindow: number;
|
|
9340
9753
|
maxTokens: number;
|
|
9341
9754
|
};
|
|
9342
|
-
readonly "openai/gpt-5-image": {
|
|
9343
|
-
id: string;
|
|
9344
|
-
name: string;
|
|
9345
|
-
api: "openai-completions";
|
|
9346
|
-
provider: string;
|
|
9347
|
-
baseUrl: string;
|
|
9348
|
-
reasoning: true;
|
|
9349
|
-
input: ("image" | "text")[];
|
|
9350
|
-
cost: {
|
|
9351
|
-
input: number;
|
|
9352
|
-
output: number;
|
|
9353
|
-
cacheRead: number;
|
|
9354
|
-
cacheWrite: number;
|
|
9355
|
-
};
|
|
9356
|
-
contextWindow: number;
|
|
9357
|
-
maxTokens: number;
|
|
9358
|
-
};
|
|
9359
|
-
readonly "openai/gpt-5-image-mini": {
|
|
9360
|
-
id: string;
|
|
9361
|
-
name: string;
|
|
9362
|
-
api: "openai-completions";
|
|
9363
|
-
provider: string;
|
|
9364
|
-
baseUrl: string;
|
|
9365
|
-
reasoning: true;
|
|
9366
|
-
input: ("image" | "text")[];
|
|
9367
|
-
cost: {
|
|
9368
|
-
input: number;
|
|
9369
|
-
output: number;
|
|
9370
|
-
cacheRead: number;
|
|
9371
|
-
cacheWrite: number;
|
|
9372
|
-
};
|
|
9373
|
-
contextWindow: number;
|
|
9374
|
-
maxTokens: number;
|
|
9375
|
-
};
|
|
9376
9755
|
readonly "openai/gpt-5-mini": {
|
|
9377
9756
|
id: string;
|
|
9378
9757
|
name: string;
|
|
@@ -9968,23 +10347,6 @@ export declare const MODELS: {
|
|
|
9968
10347
|
contextWindow: number;
|
|
9969
10348
|
maxTokens: number;
|
|
9970
10349
|
};
|
|
9971
|
-
readonly "openrouter/elephant-alpha": {
|
|
9972
|
-
id: string;
|
|
9973
|
-
name: string;
|
|
9974
|
-
api: "openai-completions";
|
|
9975
|
-
provider: string;
|
|
9976
|
-
baseUrl: string;
|
|
9977
|
-
reasoning: false;
|
|
9978
|
-
input: "text"[];
|
|
9979
|
-
cost: {
|
|
9980
|
-
input: number;
|
|
9981
|
-
output: number;
|
|
9982
|
-
cacheRead: number;
|
|
9983
|
-
cacheWrite: number;
|
|
9984
|
-
};
|
|
9985
|
-
contextWindow: number;
|
|
9986
|
-
maxTokens: number;
|
|
9987
|
-
};
|
|
9988
10350
|
readonly "openrouter/free": {
|
|
9989
10351
|
id: string;
|
|
9990
10352
|
name: string;
|
|
@@ -11345,6 +11707,23 @@ export declare const MODELS: {
|
|
|
11345
11707
|
contextWindow: number;
|
|
11346
11708
|
maxTokens: number;
|
|
11347
11709
|
};
|
|
11710
|
+
readonly "~anthropic/claude-opus-latest": {
|
|
11711
|
+
id: string;
|
|
11712
|
+
name: string;
|
|
11713
|
+
api: "openai-completions";
|
|
11714
|
+
provider: string;
|
|
11715
|
+
baseUrl: string;
|
|
11716
|
+
reasoning: true;
|
|
11717
|
+
input: ("image" | "text")[];
|
|
11718
|
+
cost: {
|
|
11719
|
+
input: number;
|
|
11720
|
+
output: number;
|
|
11721
|
+
cacheRead: number;
|
|
11722
|
+
cacheWrite: number;
|
|
11723
|
+
};
|
|
11724
|
+
contextWindow: number;
|
|
11725
|
+
maxTokens: number;
|
|
11726
|
+
};
|
|
11348
11727
|
};
|
|
11349
11728
|
readonly "vercel-ai-gateway": {
|
|
11350
11729
|
readonly "alibaba/qwen-3-14b": {
|
|
@@ -11415,6 +11794,23 @@ export declare const MODELS: {
|
|
|
11415
11794
|
contextWindow: number;
|
|
11416
11795
|
maxTokens: number;
|
|
11417
11796
|
};
|
|
11797
|
+
readonly "alibaba/qwen-3.6-max-preview": {
|
|
11798
|
+
id: string;
|
|
11799
|
+
name: string;
|
|
11800
|
+
api: "anthropic-messages";
|
|
11801
|
+
provider: string;
|
|
11802
|
+
baseUrl: string;
|
|
11803
|
+
reasoning: true;
|
|
11804
|
+
input: ("image" | "text")[];
|
|
11805
|
+
cost: {
|
|
11806
|
+
input: number;
|
|
11807
|
+
output: number;
|
|
11808
|
+
cacheRead: number;
|
|
11809
|
+
cacheWrite: number;
|
|
11810
|
+
};
|
|
11811
|
+
contextWindow: number;
|
|
11812
|
+
maxTokens: number;
|
|
11813
|
+
};
|
|
11418
11814
|
readonly "alibaba/qwen3-235b-a22b-thinking": {
|
|
11419
11815
|
id: string;
|
|
11420
11816
|
name: string;
|