@earendil-works/pi-ai 0.77.0 → 0.78.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 +9 -3
- package/dist/env-api-keys.d.ts.map +1 -1
- package/dist/env-api-keys.js +3 -0
- package/dist/env-api-keys.js.map +1 -1
- package/dist/image-models.generated.d.ts +15 -0
- package/dist/image-models.generated.d.ts.map +1 -1
- package/dist/image-models.generated.js +15 -0
- package/dist/image-models.generated.js.map +1 -1
- package/dist/models.generated.d.ts +1299 -341
- package/dist/models.generated.d.ts.map +1 -1
- package/dist/models.generated.js +1237 -545
- package/dist/models.generated.js.map +1 -1
- package/dist/providers/amazon-bedrock.d.ts.map +1 -1
- package/dist/providers/amazon-bedrock.js +82 -19
- package/dist/providers/amazon-bedrock.js.map +1 -1
- package/dist/providers/anthropic.d.ts.map +1 -1
- package/dist/providers/anthropic.js +10 -7
- package/dist/providers/anthropic.js.map +1 -1
- package/dist/providers/azure-openai-responses.d.ts.map +1 -1
- package/dist/providers/azure-openai-responses.js +5 -9
- package/dist/providers/azure-openai-responses.js.map +1 -1
- package/dist/providers/google-vertex.d.ts.map +1 -1
- package/dist/providers/google-vertex.js +1 -1
- package/dist/providers/google-vertex.js.map +1 -1
- package/dist/providers/google.d.ts.map +1 -1
- package/dist/providers/google.js +5 -3
- package/dist/providers/google.js.map +1 -1
- package/dist/providers/images/openrouter.d.ts.map +1 -1
- package/dist/providers/images/openrouter.js +2 -3
- package/dist/providers/images/openrouter.js.map +1 -1
- package/dist/providers/mistral.d.ts.map +1 -1
- package/dist/providers/mistral.js +2 -3
- package/dist/providers/mistral.js.map +1 -1
- package/dist/providers/openai-codex-responses.d.ts.map +1 -1
- package/dist/providers/openai-codex-responses.js +15 -5
- package/dist/providers/openai-codex-responses.js.map +1 -1
- package/dist/providers/openai-completions.d.ts.map +1 -1
- package/dist/providers/openai-completions.js +38 -21
- package/dist/providers/openai-completions.js.map +1 -1
- package/dist/providers/openai-responses.d.ts.map +1 -1
- package/dist/providers/openai-responses.js +5 -9
- package/dist/providers/openai-responses.js.map +1 -1
- package/dist/stream.d.ts.map +1 -1
- package/dist/stream.js +14 -2
- package/dist/stream.js.map +1 -1
- package/dist/types.d.ts +13 -5
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/utils/oauth/github-copilot.d.ts.map +1 -1
- package/dist/utils/oauth/github-copilot.js +13 -1
- package/dist/utils/oauth/github-copilot.js.map +1 -1
- package/dist/utils/oauth/openai-codex.d.ts.map +1 -1
- package/dist/utils/oauth/openai-codex.js +4 -2
- package/dist/utils/oauth/openai-codex.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -51,9 +51,11 @@ Unified LLM API with automatic model discovery, provider configuration, token an
|
|
|
51
51
|
## Supported Providers
|
|
52
52
|
|
|
53
53
|
- **OpenAI**
|
|
54
|
+
- **Ant Ling**
|
|
54
55
|
- **Azure OpenAI (Responses)**
|
|
55
56
|
- **OpenAI Codex** (ChatGPT Plus/Pro subscription, requires OAuth, see below)
|
|
56
57
|
- **DeepSeek**
|
|
58
|
+
- **NVIDIA NIM**
|
|
57
59
|
- **Anthropic**
|
|
58
60
|
- **Google**
|
|
59
61
|
- **Vertex AI** (Gemini via Vertex AI)
|
|
@@ -65,6 +67,7 @@ Unified LLM API with automatic model discovery, provider configuration, token an
|
|
|
65
67
|
- **xAI**
|
|
66
68
|
- **OpenRouter**
|
|
67
69
|
- **Vercel AI Gateway**
|
|
70
|
+
- **ZAI** (with separate Coding Plan China provider)
|
|
68
71
|
- **MiniMax**
|
|
69
72
|
- **Together AI**
|
|
70
73
|
- **GitHub Copilot** (requires OAuth, see below)
|
|
@@ -801,7 +804,7 @@ A **provider** offers models through a specific API. For example:
|
|
|
801
804
|
- **Google** models use the `google-generative-ai` API
|
|
802
805
|
- **OpenAI** models use the `openai-responses` API
|
|
803
806
|
- **Mistral** models use the `mistral-conversations` API
|
|
804
|
-
- **xAI, Cerebras, Groq, Together AI, etc.** models use the `openai-completions` API (OpenAI-compatible)
|
|
807
|
+
- **xAI, Cerebras, Groq, NVIDIA NIM, Together AI, etc.** models use the `openai-completions` API (OpenAI-compatible)
|
|
805
808
|
|
|
806
809
|
### Querying Providers and Models
|
|
807
810
|
|
|
@@ -923,7 +926,7 @@ const ollamaReasoningModel: Model<'openai-completions'> = {
|
|
|
923
926
|
|
|
924
927
|
### OpenAI Compatibility Settings
|
|
925
928
|
|
|
926
|
-
The `openai-completions` API is implemented by many providers with minor differences. By default, the library auto-detects compatibility settings based on `baseUrl` for a small set of known OpenAI-compatible providers (Cerebras, xAI, Chutes, DeepSeek, Together AI, zAi, OpenCode, Cloudflare Workers AI, etc.). For custom proxies or unknown endpoints, you can override these settings via the `compat` field. For `openai-responses` models, the compat field only supports Responses-specific flags.
|
|
929
|
+
The `openai-completions` API is implemented by many providers with minor differences. By default, the library auto-detects compatibility settings based on `baseUrl` for a small set of known OpenAI-compatible providers (Cerebras, xAI, Chutes, DeepSeek, NVIDIA NIM, Together AI, zAi, OpenCode, Cloudflare Workers AI, etc.). For custom proxies or unknown endpoints, you can override these settings via the `compat` field. For `openai-responses` models, the compat field only supports Responses-specific flags.
|
|
927
930
|
|
|
928
931
|
```typescript
|
|
929
932
|
interface OpenAICompletionsCompat {
|
|
@@ -938,7 +941,7 @@ interface OpenAICompletionsCompat {
|
|
|
938
941
|
requiresAssistantAfterToolResult?: boolean; // Whether tool results must be followed by an assistant message (default: false)
|
|
939
942
|
requiresThinkingAsText?: boolean; // Whether thinking blocks must be converted to text (default: false)
|
|
940
943
|
requiresReasoningContentOnAssistantMessages?: boolean; // Whether all replayed assistant messages must include empty reasoning_content when reasoning is enabled (default: auto-detected for DeepSeek)
|
|
941
|
-
thinkingFormat?: 'openai' | 'openrouter' | 'deepseek' | 'together' | 'zai' | 'qwen' | 'qwen-chat-template'; // Format for reasoning param: 'openai' uses reasoning_effort, 'openrouter' uses reasoning: { effort }, 'deepseek' uses thinking: { type } plus reasoning_effort, 'together' uses reasoning: { enabled } plus reasoning_effort when supported, 'zai' uses enable_thinking, 'qwen' uses enable_thinking, 'qwen-chat-template' uses chat_template_kwargs.enable_thinking (default: openai)
|
|
944
|
+
thinkingFormat?: 'openai' | 'openrouter' | 'deepseek' | 'together' | 'zai' | 'qwen' | 'qwen-chat-template' | 'string-thinking' | 'ant-ling'; // Format for reasoning param: 'openai' uses reasoning_effort, 'openrouter' uses reasoning: { effort }, 'deepseek' uses thinking: { type } plus reasoning_effort when supported, 'together' uses reasoning: { enabled } plus reasoning_effort when supported, 'zai' uses enable_thinking, 'qwen' uses enable_thinking, 'qwen-chat-template' uses chat_template_kwargs.enable_thinking, 'string-thinking' uses top-level thinking, 'ant-ling' uses reasoning: { effort } only for mapped efforts (default: openai)
|
|
942
945
|
cacheControlFormat?: 'anthropic'; // Anthropic-style cache_control on system prompt, last tool, and last user/assistant text content
|
|
943
946
|
openRouterRouting?: OpenRouterRouting; // OpenRouter routing preferences (default: {})
|
|
944
947
|
vercelGatewayRouting?: VercelGatewayRouting; // Vercel AI Gateway routing preferences (default: {})
|
|
@@ -1099,9 +1102,11 @@ In Node.js environments, you can set environment variables to avoid passing API
|
|
|
1099
1102
|
| Provider | Environment Variable(s) |
|
|
1100
1103
|
|----------|------------------------|
|
|
1101
1104
|
| OpenAI | `OPENAI_API_KEY` |
|
|
1105
|
+
| Ant Ling | `ANT_LING_API_KEY` |
|
|
1102
1106
|
| Azure OpenAI | `AZURE_OPENAI_API_KEY` + `AZURE_OPENAI_BASE_URL` (e.g. `https://{resource}.openai.azure.com`) or `AZURE_OPENAI_RESOURCE_NAME`. Supports `*.openai.azure.com` and `*.cognitiveservices.azure.com`; root endpoints auto-normalize to `/openai/v1`. Optional: `AZURE_OPENAI_API_VERSION` (default `v1`), `AZURE_OPENAI_DEPLOYMENT_NAME_MAP`. |
|
|
1103
1107
|
| Anthropic | `ANTHROPIC_API_KEY` or `ANTHROPIC_OAUTH_TOKEN` |
|
|
1104
1108
|
| DeepSeek | `DEEPSEEK_API_KEY` |
|
|
1109
|
+
| NVIDIA NIM | `NVIDIA_API_KEY` |
|
|
1105
1110
|
| Google | `GEMINI_API_KEY` |
|
|
1106
1111
|
| Vertex AI | `GOOGLE_CLOUD_API_KEY` or `GOOGLE_CLOUD_PROJECT` (or `GCLOUD_PROJECT`) + `GOOGLE_CLOUD_LOCATION` + ADC |
|
|
1107
1112
|
| Mistral | `MISTRAL_API_KEY` |
|
|
@@ -1115,6 +1120,7 @@ In Node.js environments, you can set environment variables to avoid passing API
|
|
|
1115
1120
|
| OpenRouter | `OPENROUTER_API_KEY` |
|
|
1116
1121
|
| Vercel AI Gateway | `AI_GATEWAY_API_KEY` |
|
|
1117
1122
|
| zAI | `ZAI_API_KEY` |
|
|
1123
|
+
| ZAI Coding Plan (China) | `ZAI_CODING_CN_API_KEY` |
|
|
1118
1124
|
| MiniMax | `MINIMAX_API_KEY` |
|
|
1119
1125
|
| OpenCode Zen / OpenCode Go | `OPENCODE_API_KEY` |
|
|
1120
1126
|
| Kimi For Coding | `KIMI_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;
|
|
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;AAiHhD;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,aAAa,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC;AAC3E,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC;AASpE;;;;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\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.ts\";\n\nlet _procEnvCache: Map<string, string> | null = null;\n\n/**\n * Fallback for https://github.com/oven-sh/bun/issues/27802\n * Bun compiled binaries have an empty `process.env` inside sandbox\n * environments on Linux. We can recover the env from `/proc/self/environ`.\n */\nfunction getProcEnv(key: string): string | undefined {\n\tif (!process.versions?.bun) return undefined;\n\tif (typeof process === \"undefined\") return undefined;\n\n\t// If process.env already has entries, the bug is not triggered.\n\tif (Object.keys(process.env).length > 0) return undefined;\n\n\tif (_procEnvCache === null) {\n\t\t_procEnvCache = new Map();\n\t\ttry {\n\t\t\tconst { readFileSync } = require(\"node:fs\") as typeof import(\"node:fs\");\n\t\t\tconst data = readFileSync(\"/proc/self/environ\", \"utf-8\");\n\t\t\tfor (const entry of data.split(\"\\0\")) {\n\t\t\t\tconst idx = entry.indexOf(\"=\");\n\t\t\t\tif (idx > 0) {\n\t\t\t\t\t_procEnvCache.set(entry.slice(0, idx), entry.slice(idx + 1));\n\t\t\t\t}\n\t\t\t}\n\t\t} catch {\n\t\t\t// /proc/self/environ may not be readable.\n\t\t}\n\t}\n\n\treturn _procEnvCache.get(key);\n}\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 || getProcEnv(\"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\nfunction getApiKeyEnvVars(provider: string): readonly string[] | undefined {\n\tif (provider === \"github-copilot\") {\n\t\treturn [\"COPILOT_GITHUB_TOKEN\"];\n\t}\n\n\t// ANTHROPIC_OAUTH_TOKEN takes precedence over ANTHROPIC_API_KEY\n\tif (provider === \"anthropic\") {\n\t\treturn [\"ANTHROPIC_OAUTH_TOKEN\", \"ANTHROPIC_API_KEY\"];\n\t}\n\n\tconst envMap: Record<string, string> = {\n\t\t\"ant-ling\": \"ANT_LING_API_KEY\",\n\t\topenai: \"OPENAI_API_KEY\",\n\t\t\"azure-openai-responses\": \"AZURE_OPENAI_API_KEY\",\n\t\tnvidia: \"NVIDIA_API_KEY\",\n\t\tdeepseek: \"DEEPSEEK_API_KEY\",\n\t\tgoogle: \"GEMINI_API_KEY\",\n\t\t\"google-vertex\": \"GOOGLE_CLOUD_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\t\"zai-coding-cn\": \"ZAI_CODING_CN_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\tmoonshotai: \"MOONSHOT_API_KEY\",\n\t\t\"moonshotai-cn\": \"MOONSHOT_API_KEY\",\n\t\thuggingface: \"HF_TOKEN\",\n\t\tfireworks: \"FIREWORKS_API_KEY\",\n\t\ttogether: \"TOGETHER_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\t\"cloudflare-workers-ai\": \"CLOUDFLARE_API_KEY\",\n\t\t\"cloudflare-ai-gateway\": \"CLOUDFLARE_API_KEY\",\n\t\txiaomi: \"XIAOMI_API_KEY\",\n\t\t\"xiaomi-token-plan-cn\": \"XIAOMI_TOKEN_PLAN_CN_API_KEY\",\n\t\t\"xiaomi-token-plan-ams\": \"XIAOMI_TOKEN_PLAN_AMS_API_KEY\",\n\t\t\"xiaomi-token-plan-sgp\": \"XIAOMI_TOKEN_PLAN_SGP_API_KEY\",\n\t};\n\n\tconst envVar = envMap[provider];\n\treturn envVar ? [envVar] : undefined;\n}\n\n/**\n * Find configured environment variables that can provide an API key for a provider.\n *\n * This only reports actual API key variables. It intentionally excludes ambient\n * credential sources such as AWS profiles, AWS IAM credentials, and Google\n * Application Default Credentials.\n */\nexport function findEnvKeys(provider: KnownProvider): string[] | undefined;\nexport function findEnvKeys(provider: string): string[] | undefined;\nexport function findEnvKeys(provider: string): string[] | undefined {\n\tconst envVars = getApiKeyEnvVars(provider);\n\tif (!envVars) return undefined;\n\n\tconst found = envVars.filter((envVar) => !!process.env[envVar] || !!getProcEnv(envVar));\n\treturn found.length > 0 ? found : undefined;\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: string): string | undefined {\n\tconst envKeys = findEnvKeys(provider);\n\tif (envKeys?.[0]) {\n\t\treturn process.env[envKeys[0]] || getProcEnv(envKeys[0]);\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\tconst hasCredentials = hasVertexAdcCredentials();\n\t\tconst hasProject = !!(\n\t\t\tprocess.env.GOOGLE_CLOUD_PROJECT ||\n\t\t\tprocess.env.GCLOUD_PROJECT ||\n\t\t\tgetProcEnv(\"GOOGLE_CLOUD_PROJECT\") ||\n\t\t\tgetProcEnv(\"GCLOUD_PROJECT\")\n\t\t);\n\t\tconst hasLocation = !!(process.env.GOOGLE_CLOUD_LOCATION || getProcEnv(\"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 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\tgetProcEnv(\"AWS_PROFILE\") ||\n\t\t\t(getProcEnv(\"AWS_ACCESS_KEY_ID\") && getProcEnv(\"AWS_SECRET_ACCESS_KEY\")) ||\n\t\t\tgetProcEnv(\"AWS_BEARER_TOKEN_BEDROCK\") ||\n\t\t\tgetProcEnv(\"AWS_CONTAINER_CREDENTIALS_RELATIVE_URI\") ||\n\t\t\tgetProcEnv(\"AWS_CONTAINER_CREDENTIALS_FULL_URI\") ||\n\t\t\tgetProcEnv(\"AWS_WEB_IDENTITY_TOKEN_FILE\")\n\t\t) {\n\t\t\treturn \"<authenticated>\";\n\t\t}\n\t}\n\n\treturn undefined;\n}\n"]}
|
package/dist/env-api-keys.js
CHANGED
|
@@ -93,8 +93,10 @@ function getApiKeyEnvVars(provider) {
|
|
|
93
93
|
return ["ANTHROPIC_OAUTH_TOKEN", "ANTHROPIC_API_KEY"];
|
|
94
94
|
}
|
|
95
95
|
const envMap = {
|
|
96
|
+
"ant-ling": "ANT_LING_API_KEY",
|
|
96
97
|
openai: "OPENAI_API_KEY",
|
|
97
98
|
"azure-openai-responses": "AZURE_OPENAI_API_KEY",
|
|
99
|
+
nvidia: "NVIDIA_API_KEY",
|
|
98
100
|
deepseek: "DEEPSEEK_API_KEY",
|
|
99
101
|
google: "GEMINI_API_KEY",
|
|
100
102
|
"google-vertex": "GOOGLE_CLOUD_API_KEY",
|
|
@@ -104,6 +106,7 @@ function getApiKeyEnvVars(provider) {
|
|
|
104
106
|
openrouter: "OPENROUTER_API_KEY",
|
|
105
107
|
"vercel-ai-gateway": "AI_GATEWAY_API_KEY",
|
|
106
108
|
zai: "ZAI_API_KEY",
|
|
109
|
+
"zai-coding-cn": "ZAI_CODING_CN_API_KEY",
|
|
107
110
|
mistral: "MISTRAL_API_KEY",
|
|
108
111
|
minimax: "MINIMAX_API_KEY",
|
|
109
112
|
"minimax-cn": "MINIMAX_CN_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,kEAAkE;AAClE,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,kCAAC,SAAS,EAAC,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,I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AO,iBAAiB,CAAC;QAC1B,CAAC;IACF,CAAC;IAED,IAAI,QAAQ,KAAK,gBAAgB,EAAE,CAAC;QACnC,uDAAuD;QACvD,yDAAyD;QACzD,mEAAmE;QACnE,qDAAqD;QACrD,6DAA6D;QAC7D,oEAAoE;QACpE,yEAAyE;QACzE,IACC,OAAO,CAAC,GAAG,CAAC,WAAW;YACvB,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,IAAI,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC;YACpE,OAAO,CAAC,GAAG,CAAC,wBAAwB;YACpC,OAAO,CAAC,GAAG,CAAC,sCAAsC;YAClD,OAAO,CAAC,GAAG,CAAC,kCAAkC;YAC9C,OAAO,CAAC,GAAG,CAAC,2BAA2B;YACvC,UAAU,CAAC,aAAa,CAAC;YACzB,CAAC,UAAU,CAAC,mBAAmB,CAAC,IAAI,UAAU,CAAC,uBAAuB,CAAC,CAAC;YACxE,UAAU,CAAC,0BAA0B,CAAC;YACtC,UAAU,CAAC,wCAAwC,CAAC;YACpD,UAAU,CAAC,oCAAoC,CAAC;YAChD,UAAU,CAAC,6BAA6B,CAAC,EACxC,CAAC;YACF,OAAO,iBAAiB,CAAC;QAC1B,CAAC;IACF,CAAC;IAED,OAAO,SAAS,CAAC;AAAA,CACjB","sourcesContent":["// NEVER convert to top-level imports - breaks browser/Vite builds\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.ts\";\n\nlet _procEnvCache: Map<string, string> | null = null;\n\n/**\n * Fallback for https://github.com/oven-sh/bun/issues/27802\n * Bun compiled binaries have an empty `process.env` inside sandbox\n * environments on Linux. We can recover the env from `/proc/self/environ`.\n */\nfunction getProcEnv(key: string): string | undefined {\n\tif (!process.versions?.bun) return undefined;\n\tif (typeof process === \"undefined\") return undefined;\n\n\t// If process.env already has entries, the bug is not triggered.\n\tif (Object.keys(process.env).length > 0) return undefined;\n\n\tif (_procEnvCache === null) {\n\t\t_procEnvCache = new Map();\n\t\ttry {\n\t\t\tconst { readFileSync } = require(\"node:fs\") as typeof import(\"node:fs\");\n\t\t\tconst data = readFileSync(\"/proc/self/environ\", \"utf-8\");\n\t\t\tfor (const entry of data.split(\"\\0\")) {\n\t\t\t\tconst idx = entry.indexOf(\"=\");\n\t\t\t\tif (idx > 0) {\n\t\t\t\t\t_procEnvCache.set(entry.slice(0, idx), entry.slice(idx + 1));\n\t\t\t\t}\n\t\t\t}\n\t\t} catch {\n\t\t\t// /proc/self/environ may not be readable.\n\t\t}\n\t}\n\n\treturn _procEnvCache.get(key);\n}\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 || getProcEnv(\"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\nfunction getApiKeyEnvVars(provider: string): readonly string[] | undefined {\n\tif (provider === \"github-copilot\") {\n\t\treturn [\"COPILOT_GITHUB_TOKEN\"];\n\t}\n\n\t// ANTHROPIC_OAUTH_TOKEN takes precedence over ANTHROPIC_API_KEY\n\tif (provider === \"anthropic\") {\n\t\treturn [\"ANTHROPIC_OAUTH_TOKEN\", \"ANTHROPIC_API_KEY\"];\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\tdeepseek: \"DEEPSEEK_API_KEY\",\n\t\tgoogle: \"GEMINI_API_KEY\",\n\t\t\"google-vertex\": \"GOOGLE_CLOUD_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\tmoonshotai: \"MOONSHOT_API_KEY\",\n\t\t\"moonshotai-cn\": \"MOONSHOT_API_KEY\",\n\t\thuggingface: \"HF_TOKEN\",\n\t\tfireworks: \"FIREWORKS_API_KEY\",\n\t\ttogether: \"TOGETHER_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\t\"cloudflare-workers-ai\": \"CLOUDFLARE_API_KEY\",\n\t\t\"cloudflare-ai-gateway\": \"CLOUDFLARE_API_KEY\",\n\t\txiaomi: \"XIAOMI_API_KEY\",\n\t\t\"xiaomi-token-plan-cn\": \"XIAOMI_TOKEN_PLAN_CN_API_KEY\",\n\t\t\"xiaomi-token-plan-ams\": \"XIAOMI_TOKEN_PLAN_AMS_API_KEY\",\n\t\t\"xiaomi-token-plan-sgp\": \"XIAOMI_TOKEN_PLAN_SGP_API_KEY\",\n\t};\n\n\tconst envVar = envMap[provider];\n\treturn envVar ? [envVar] : undefined;\n}\n\n/**\n * Find configured environment variables that can provide an API key for a provider.\n *\n * This only reports actual API key variables. It intentionally excludes ambient\n * credential sources such as AWS profiles, AWS IAM credentials, and Google\n * Application Default Credentials.\n */\nexport function findEnvKeys(provider: KnownProvider): string[] | undefined;\nexport function findEnvKeys(provider: string): string[] | undefined;\nexport function findEnvKeys(provider: string): string[] | undefined {\n\tconst envVars = getApiKeyEnvVars(provider);\n\tif (!envVars) return undefined;\n\n\tconst found = envVars.filter((envVar) => !!process.env[envVar] || !!getProcEnv(envVar));\n\treturn found.length > 0 ? found : undefined;\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: string): string | undefined {\n\tconst envKeys = findEnvKeys(provider);\n\tif (envKeys?.[0]) {\n\t\treturn process.env[envKeys[0]] || getProcEnv(envKeys[0]);\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\tconst hasCredentials = hasVertexAdcCredentials();\n\t\tconst hasProject = !!(\n\t\t\tprocess.env.GOOGLE_CLOUD_PROJECT ||\n\t\t\tprocess.env.GCLOUD_PROJECT ||\n\t\t\tgetProcEnv(\"GOOGLE_CLOUD_PROJECT\") ||\n\t\t\tgetProcEnv(\"GCLOUD_PROJECT\")\n\t\t);\n\t\tconst hasLocation = !!(process.env.GOOGLE_CLOUD_LOCATION || getProcEnv(\"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 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\tgetProcEnv(\"AWS_PROFILE\") ||\n\t\t\t(getProcEnv(\"AWS_ACCESS_KEY_ID\") && getProcEnv(\"AWS_SECRET_ACCESS_KEY\")) ||\n\t\t\tgetProcEnv(\"AWS_BEARER_TOKEN_BEDROCK\") ||\n\t\t\tgetProcEnv(\"AWS_CONTAINER_CREDENTIALS_RELATIVE_URI\") ||\n\t\t\tgetProcEnv(\"AWS_CONTAINER_CREDENTIALS_FULL_URI\") ||\n\t\t\tgetProcEnv(\"AWS_WEB_IDENTITY_TOKEN_FILE\")\n\t\t) {\n\t\t\treturn \"<authenticated>\";\n\t\t}\n\t}\n\n\treturn undefined;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"env-api-keys.js","sourceRoot":"","sources":["../src/env-api-keys.ts"],"names":[],"mappings":";;;;;;;;AAAA,kEAAkE;AAClE,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,kCAAC,SAAS,EAAC,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,iB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D;QACrD,6DAA6D;QAC7D,oEAAoE;QACpE,yEAAyE;QACzE,IACC,OAAO,CAAC,GAAG,CAAC,WAAW;YACvB,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,IAAI,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC;YACpE,OAAO,CAAC,GAAG,CAAC,wBAAwB;YACpC,OAAO,CAAC,GAAG,CAAC,sCAAsC;YAClD,OAAO,CAAC,GAAG,CAAC,kCAAkC;YAC9C,OAAO,CAAC,GAAG,CAAC,2BAA2B;YACvC,UAAU,CAAC,aAAa,CAAC;YACzB,CAAC,UAAU,CAAC,mBAAmB,CAAC,IAAI,UAAU,CAAC,uBAAuB,CAAC,CAAC;YACxE,UAAU,CAAC,0BAA0B,CAAC;YACtC,UAAU,CAAC,wCAAwC,CAAC;YACpD,UAAU,CAAC,oCAAoC,CAAC;YAChD,UAAU,CAAC,6BAA6B,CAAC,EACxC,CAAC;YACF,OAAO,iBAAiB,CAAC;QAC1B,CAAC;IACF,CAAC;IAED,OAAO,SAAS,CAAC;AAAA,CACjB","sourcesContent":["// NEVER convert to top-level imports - breaks browser/Vite builds\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.ts\";\n\nlet _procEnvCache: Map<string, string> | null = null;\n\n/**\n * Fallback for https://github.com/oven-sh/bun/issues/27802\n * Bun compiled binaries have an empty `process.env` inside sandbox\n * environments on Linux. We can recover the env from `/proc/self/environ`.\n */\nfunction getProcEnv(key: string): string | undefined {\n\tif (!process.versions?.bun) return undefined;\n\tif (typeof process === \"undefined\") return undefined;\n\n\t// If process.env already has entries, the bug is not triggered.\n\tif (Object.keys(process.env).length > 0) return undefined;\n\n\tif (_procEnvCache === null) {\n\t\t_procEnvCache = new Map();\n\t\ttry {\n\t\t\tconst { readFileSync } = require(\"node:fs\") as typeof import(\"node:fs\");\n\t\t\tconst data = readFileSync(\"/proc/self/environ\", \"utf-8\");\n\t\t\tfor (const entry of data.split(\"\\0\")) {\n\t\t\t\tconst idx = entry.indexOf(\"=\");\n\t\t\t\tif (idx > 0) {\n\t\t\t\t\t_procEnvCache.set(entry.slice(0, idx), entry.slice(idx + 1));\n\t\t\t\t}\n\t\t\t}\n\t\t} catch {\n\t\t\t// /proc/self/environ may not be readable.\n\t\t}\n\t}\n\n\treturn _procEnvCache.get(key);\n}\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 || getProcEnv(\"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\nfunction getApiKeyEnvVars(provider: string): readonly string[] | undefined {\n\tif (provider === \"github-copilot\") {\n\t\treturn [\"COPILOT_GITHUB_TOKEN\"];\n\t}\n\n\t// ANTHROPIC_OAUTH_TOKEN takes precedence over ANTHROPIC_API_KEY\n\tif (provider === \"anthropic\") {\n\t\treturn [\"ANTHROPIC_OAUTH_TOKEN\", \"ANTHROPIC_API_KEY\"];\n\t}\n\n\tconst envMap: Record<string, string> = {\n\t\t\"ant-ling\": \"ANT_LING_API_KEY\",\n\t\topenai: \"OPENAI_API_KEY\",\n\t\t\"azure-openai-responses\": \"AZURE_OPENAI_API_KEY\",\n\t\tnvidia: \"NVIDIA_API_KEY\",\n\t\tdeepseek: \"DEEPSEEK_API_KEY\",\n\t\tgoogle: \"GEMINI_API_KEY\",\n\t\t\"google-vertex\": \"GOOGLE_CLOUD_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\t\"zai-coding-cn\": \"ZAI_CODING_CN_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\tmoonshotai: \"MOONSHOT_API_KEY\",\n\t\t\"moonshotai-cn\": \"MOONSHOT_API_KEY\",\n\t\thuggingface: \"HF_TOKEN\",\n\t\tfireworks: \"FIREWORKS_API_KEY\",\n\t\ttogether: \"TOGETHER_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\t\"cloudflare-workers-ai\": \"CLOUDFLARE_API_KEY\",\n\t\t\"cloudflare-ai-gateway\": \"CLOUDFLARE_API_KEY\",\n\t\txiaomi: \"XIAOMI_API_KEY\",\n\t\t\"xiaomi-token-plan-cn\": \"XIAOMI_TOKEN_PLAN_CN_API_KEY\",\n\t\t\"xiaomi-token-plan-ams\": \"XIAOMI_TOKEN_PLAN_AMS_API_KEY\",\n\t\t\"xiaomi-token-plan-sgp\": \"XIAOMI_TOKEN_PLAN_SGP_API_KEY\",\n\t};\n\n\tconst envVar = envMap[provider];\n\treturn envVar ? [envVar] : undefined;\n}\n\n/**\n * Find configured environment variables that can provide an API key for a provider.\n *\n * This only reports actual API key variables. It intentionally excludes ambient\n * credential sources such as AWS profiles, AWS IAM credentials, and Google\n * Application Default Credentials.\n */\nexport function findEnvKeys(provider: KnownProvider): string[] | undefined;\nexport function findEnvKeys(provider: string): string[] | undefined;\nexport function findEnvKeys(provider: string): string[] | undefined {\n\tconst envVars = getApiKeyEnvVars(provider);\n\tif (!envVars) return undefined;\n\n\tconst found = envVars.filter((envVar) => !!process.env[envVar] || !!getProcEnv(envVar));\n\treturn found.length > 0 ? found : undefined;\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: string): string | undefined {\n\tconst envKeys = findEnvKeys(provider);\n\tif (envKeys?.[0]) {\n\t\treturn process.env[envKeys[0]] || getProcEnv(envKeys[0]);\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\tconst hasCredentials = hasVertexAdcCredentials();\n\t\tconst hasProject = !!(\n\t\t\tprocess.env.GOOGLE_CLOUD_PROJECT ||\n\t\t\tprocess.env.GCLOUD_PROJECT ||\n\t\t\tgetProcEnv(\"GOOGLE_CLOUD_PROJECT\") ||\n\t\t\tgetProcEnv(\"GCLOUD_PROJECT\")\n\t\t);\n\t\tconst hasLocation = !!(process.env.GOOGLE_CLOUD_LOCATION || getProcEnv(\"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 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\tgetProcEnv(\"AWS_PROFILE\") ||\n\t\t\t(getProcEnv(\"AWS_ACCESS_KEY_ID\") && getProcEnv(\"AWS_SECRET_ACCESS_KEY\")) ||\n\t\t\tgetProcEnv(\"AWS_BEARER_TOKEN_BEDROCK\") ||\n\t\t\tgetProcEnv(\"AWS_CONTAINER_CREDENTIALS_RELATIVE_URI\") ||\n\t\t\tgetProcEnv(\"AWS_CONTAINER_CREDENTIALS_FULL_URI\") ||\n\t\t\tgetProcEnv(\"AWS_WEB_IDENTITY_TOKEN_FILE\")\n\t\t) {\n\t\t\treturn \"<authenticated>\";\n\t\t}\n\t}\n\n\treturn undefined;\n}\n"]}
|
|
@@ -120,6 +120,21 @@ export declare const IMAGE_MODELS: {
|
|
|
120
120
|
cacheWrite: number;
|
|
121
121
|
};
|
|
122
122
|
};
|
|
123
|
+
readonly "microsoft/mai-image-2.5": {
|
|
124
|
+
id: string;
|
|
125
|
+
name: string;
|
|
126
|
+
api: "openrouter-images";
|
|
127
|
+
provider: string;
|
|
128
|
+
baseUrl: string;
|
|
129
|
+
input: ("image" | "text")[];
|
|
130
|
+
output: "image"[];
|
|
131
|
+
cost: {
|
|
132
|
+
input: number;
|
|
133
|
+
output: number;
|
|
134
|
+
cacheRead: number;
|
|
135
|
+
cacheWrite: number;
|
|
136
|
+
};
|
|
137
|
+
};
|
|
123
138
|
readonly "openai/gpt-5-image": {
|
|
124
139
|
id: string;
|
|
125
140
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image-models.generated.d.ts","sourceRoot":"","sources":["../src/image-models.generated.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsbkD,CAAC","sourcesContent":["// This file is auto-generated by scripts/generate-image-models.ts\n// Do not edit manually - run 'npm run generate-image-models' to update\n\nimport type { ImagesApi, ImagesModel } from \"./types.ts\";\n\nexport const IMAGE_MODELS = {\n\t\"openrouter\": {\n\t\t\"black-forest-labs/flux.2-flex\": {\n\t\t\tid: \"black-forest-labs/flux.2-flex\",\n\t\t\tname: \"Black Forest Labs: FLUX.2 Flex\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"black-forest-labs/flux.2-klein-4b\": {\n\t\t\tid: \"black-forest-labs/flux.2-klein-4b\",\n\t\t\tname: \"Black Forest Labs: FLUX.2 Klein 4B\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"black-forest-labs/flux.2-max\": {\n\t\t\tid: \"black-forest-labs/flux.2-max\",\n\t\t\tname: \"Black Forest Labs: FLUX.2 Max\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"black-forest-labs/flux.2-pro\": {\n\t\t\tid: \"black-forest-labs/flux.2-pro\",\n\t\t\tname: \"Black Forest Labs: FLUX.2 Pro\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"bytedance-seed/seedream-4.5\": {\n\t\t\tid: \"bytedance-seed/seedream-4.5\",\n\t\t\tname: \"ByteDance Seed: Seedream 4.5\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"image\",\"text\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"google/gemini-2.5-flash-image\": {\n\t\t\tid: \"google/gemini-2.5-flash-image\",\n\t\t\tname: \"Google: Nano Banana (Gemini 2.5 Flash Image)\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"image\",\"text\"],\n\t\t\toutput: [\"image\",\"text\"],\n\t\t\tcost: \t{\n\t \"input\": 0.3,\n\t \"output\": 2.5,\n\t \"cacheRead\": 0.03,\n\t \"cacheWrite\": 0.08333333333333334\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"google/gemini-3-pro-image-preview\": {\n\t\t\tid: \"google/gemini-3-pro-image-preview\",\n\t\t\tname: \"Google: Nano Banana Pro (Gemini 3 Pro Image Preview)\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"image\",\"text\"],\n\t\t\toutput: [\"image\",\"text\"],\n\t\t\tcost: \t{\n\t \"input\": 2,\n\t \"output\": 12,\n\t \"cacheRead\": 0.19999999999999998,\n\t \"cacheWrite\": 0.375\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"google/gemini-3.1-flash-image-preview\": {\n\t\t\tid: \"google/gemini-3.1-flash-image-preview\",\n\t\t\tname: \"Google: Nano Banana 2 (Gemini 3.1 Flash Image Preview)\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"image\",\"text\"],\n\t\t\toutput: [\"image\",\"text\"],\n\t\t\tcost: \t{\n\t \"input\": 0.5,\n\t \"output\": 3,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"openai/gpt-5-image\": {\n\t\t\tid: \"openai/gpt-5-image\",\n\t\t\tname: \"OpenAI: GPT-5 Image\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"image\",\"text\"],\n\t\t\toutput: [\"image\",\"text\"],\n\t\t\tcost: \t{\n\t \"input\": 10,\n\t \"output\": 10,\n\t \"cacheRead\": 1.25,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"openai/gpt-5-image-mini\": {\n\t\t\tid: \"openai/gpt-5-image-mini\",\n\t\t\tname: \"OpenAI: GPT-5 Image Mini\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"image\",\"text\"],\n\t\t\toutput: [\"image\",\"text\"],\n\t\t\tcost: \t{\n\t \"input\": 2.5,\n\t \"output\": 2,\n\t \"cacheRead\": 0.25,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"openai/gpt-5.4-image-2\": {\n\t\t\tid: \"openai/gpt-5.4-image-2\",\n\t\t\tname: \"OpenAI: GPT-5.4 Image 2\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"image\",\"text\"],\n\t\t\toutput: [\"image\",\"text\"],\n\t\t\tcost: \t{\n\t \"input\": 8,\n\t \"output\": 15,\n\t \"cacheRead\": 2,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"openrouter/auto\": {\n\t\t\tid: \"openrouter/auto\",\n\t\t\tname: \"Auto Router\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"text\",\"image\"],\n\t\t\tcost: \t{\n\t \"input\": -1000000,\n\t \"output\": -1000000,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"recraft/recraft-v3\": {\n\t\t\tid: \"recraft/recraft-v3\",\n\t\t\tname: \"Recraft: Recraft V3\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"recraft/recraft-v4\": {\n\t\t\tid: \"recraft/recraft-v4\",\n\t\t\tname: \"Recraft: Recraft V4\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"recraft/recraft-v4-pro\": {\n\t\t\tid: \"recraft/recraft-v4-pro\",\n\t\t\tname: \"Recraft: Recraft V4 Pro\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"recraft/recraft-v4-pro-vector\": {\n\t\t\tid: \"recraft/recraft-v4-pro-vector\",\n\t\t\tname: \"Recraft: Recraft V4 Pro Vector\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"recraft/recraft-v4-vector\": {\n\t\t\tid: \"recraft/recraft-v4-vector\",\n\t\t\tname: \"Recraft: Recraft V4 Vector\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"recraft/recraft-v4.1\": {\n\t\t\tid: \"recraft/recraft-v4.1\",\n\t\t\tname: \"Recraft: Recraft V4.1\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"recraft/recraft-v4.1-pro\": {\n\t\t\tid: \"recraft/recraft-v4.1-pro\",\n\t\t\tname: \"Recraft: Recraft V4.1 Pro\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"recraft/recraft-v4.1-pro-vector\": {\n\t\t\tid: \"recraft/recraft-v4.1-pro-vector\",\n\t\t\tname: \"Recraft: Recraft V4.1 Pro Vector\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"recraft/recraft-v4.1-utility\": {\n\t\t\tid: \"recraft/recraft-v4.1-utility\",\n\t\t\tname: \"Recraft: Recraft V4.1 Utility\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"recraft/recraft-v4.1-utility-pro\": {\n\t\t\tid: \"recraft/recraft-v4.1-utility-pro\",\n\t\t\tname: \"Recraft: Recraft V4.1 Utility Pro\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"recraft/recraft-v4.1-vector\": {\n\t\t\tid: \"recraft/recraft-v4.1-vector\",\n\t\t\tname: \"Recraft: Recraft V4.1 Vector\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"sourceful/riverflow-v2-fast\": {\n\t\t\tid: \"sourceful/riverflow-v2-fast\",\n\t\t\tname: \"Sourceful: Riverflow V2 Fast\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"sourceful/riverflow-v2-fast-preview\": {\n\t\t\tid: \"sourceful/riverflow-v2-fast-preview\",\n\t\t\tname: \"Sourceful: Riverflow V2 Fast Preview\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"sourceful/riverflow-v2-max-preview\": {\n\t\t\tid: \"sourceful/riverflow-v2-max-preview\",\n\t\t\tname: \"Sourceful: Riverflow V2 Max Preview\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"sourceful/riverflow-v2-pro\": {\n\t\t\tid: \"sourceful/riverflow-v2-pro\",\n\t\t\tname: \"Sourceful: Riverflow V2 Pro\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"sourceful/riverflow-v2-standard-preview\": {\n\t\t\tid: \"sourceful/riverflow-v2-standard-preview\",\n\t\t\tname: \"Sourceful: Riverflow V2 Standard Preview\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"x-ai/grok-imagine-image-quality\": {\n\t\t\tid: \"x-ai/grok-imagine-image-quality\",\n\t\t\tname: \"xAI: Grok Imagine Image Quality\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t},\n} as const satisfies Record<string, Record<string, ImagesModel<ImagesApi>>>;\n"]}
|
|
1
|
+
{"version":3,"file":"image-models.generated.d.ts","sourceRoot":"","sources":["../src/image-models.generated.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqckD,CAAC","sourcesContent":["// This file is auto-generated by scripts/generate-image-models.ts\n// Do not edit manually - run 'npm run generate-image-models' to update\n\nimport type { ImagesApi, ImagesModel } from \"./types.ts\";\n\nexport const IMAGE_MODELS = {\n\t\"openrouter\": {\n\t\t\"black-forest-labs/flux.2-flex\": {\n\t\t\tid: \"black-forest-labs/flux.2-flex\",\n\t\t\tname: \"Black Forest Labs: FLUX.2 Flex\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"black-forest-labs/flux.2-klein-4b\": {\n\t\t\tid: \"black-forest-labs/flux.2-klein-4b\",\n\t\t\tname: \"Black Forest Labs: FLUX.2 Klein 4B\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"black-forest-labs/flux.2-max\": {\n\t\t\tid: \"black-forest-labs/flux.2-max\",\n\t\t\tname: \"Black Forest Labs: FLUX.2 Max\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"black-forest-labs/flux.2-pro\": {\n\t\t\tid: \"black-forest-labs/flux.2-pro\",\n\t\t\tname: \"Black Forest Labs: FLUX.2 Pro\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"bytedance-seed/seedream-4.5\": {\n\t\t\tid: \"bytedance-seed/seedream-4.5\",\n\t\t\tname: \"ByteDance Seed: Seedream 4.5\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"image\",\"text\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"google/gemini-2.5-flash-image\": {\n\t\t\tid: \"google/gemini-2.5-flash-image\",\n\t\t\tname: \"Google: Nano Banana (Gemini 2.5 Flash Image)\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"image\",\"text\"],\n\t\t\toutput: [\"image\",\"text\"],\n\t\t\tcost: \t{\n\t \"input\": 0.3,\n\t \"output\": 2.5,\n\t \"cacheRead\": 0.03,\n\t \"cacheWrite\": 0.08333333333333334\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"google/gemini-3-pro-image-preview\": {\n\t\t\tid: \"google/gemini-3-pro-image-preview\",\n\t\t\tname: \"Google: Nano Banana Pro (Gemini 3 Pro Image Preview)\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"image\",\"text\"],\n\t\t\toutput: [\"image\",\"text\"],\n\t\t\tcost: \t{\n\t \"input\": 2,\n\t \"output\": 12,\n\t \"cacheRead\": 0.19999999999999998,\n\t \"cacheWrite\": 0.375\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"google/gemini-3.1-flash-image-preview\": {\n\t\t\tid: \"google/gemini-3.1-flash-image-preview\",\n\t\t\tname: \"Google: Nano Banana 2 (Gemini 3.1 Flash Image Preview)\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"image\",\"text\"],\n\t\t\toutput: [\"image\",\"text\"],\n\t\t\tcost: \t{\n\t \"input\": 0.5,\n\t \"output\": 3,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"microsoft/mai-image-2.5\": {\n\t\t\tid: \"microsoft/mai-image-2.5\",\n\t\t\tname: \"Microsoft: MAI-Image-2.5\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 5,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"openai/gpt-5-image\": {\n\t\t\tid: \"openai/gpt-5-image\",\n\t\t\tname: \"OpenAI: GPT-5 Image\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"image\",\"text\"],\n\t\t\toutput: [\"image\",\"text\"],\n\t\t\tcost: \t{\n\t \"input\": 10,\n\t \"output\": 10,\n\t \"cacheRead\": 1.25,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"openai/gpt-5-image-mini\": {\n\t\t\tid: \"openai/gpt-5-image-mini\",\n\t\t\tname: \"OpenAI: GPT-5 Image Mini\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"image\",\"text\"],\n\t\t\toutput: [\"image\",\"text\"],\n\t\t\tcost: \t{\n\t \"input\": 2.5,\n\t \"output\": 2,\n\t \"cacheRead\": 0.25,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"openai/gpt-5.4-image-2\": {\n\t\t\tid: \"openai/gpt-5.4-image-2\",\n\t\t\tname: \"OpenAI: GPT-5.4 Image 2\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"image\",\"text\"],\n\t\t\toutput: [\"image\",\"text\"],\n\t\t\tcost: \t{\n\t \"input\": 8,\n\t \"output\": 15,\n\t \"cacheRead\": 2,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"openrouter/auto\": {\n\t\t\tid: \"openrouter/auto\",\n\t\t\tname: \"Auto Router\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"text\",\"image\"],\n\t\t\tcost: \t{\n\t \"input\": -1000000,\n\t \"output\": -1000000,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"recraft/recraft-v3\": {\n\t\t\tid: \"recraft/recraft-v3\",\n\t\t\tname: \"Recraft: Recraft V3\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"recraft/recraft-v4\": {\n\t\t\tid: \"recraft/recraft-v4\",\n\t\t\tname: \"Recraft: Recraft V4\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"recraft/recraft-v4-pro\": {\n\t\t\tid: \"recraft/recraft-v4-pro\",\n\t\t\tname: \"Recraft: Recraft V4 Pro\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"recraft/recraft-v4-pro-vector\": {\n\t\t\tid: \"recraft/recraft-v4-pro-vector\",\n\t\t\tname: \"Recraft: Recraft V4 Pro Vector\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"recraft/recraft-v4-vector\": {\n\t\t\tid: \"recraft/recraft-v4-vector\",\n\t\t\tname: \"Recraft: Recraft V4 Vector\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"recraft/recraft-v4.1\": {\n\t\t\tid: \"recraft/recraft-v4.1\",\n\t\t\tname: \"Recraft: Recraft V4.1\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"recraft/recraft-v4.1-pro\": {\n\t\t\tid: \"recraft/recraft-v4.1-pro\",\n\t\t\tname: \"Recraft: Recraft V4.1 Pro\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"recraft/recraft-v4.1-pro-vector\": {\n\t\t\tid: \"recraft/recraft-v4.1-pro-vector\",\n\t\t\tname: \"Recraft: Recraft V4.1 Pro Vector\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"recraft/recraft-v4.1-utility\": {\n\t\t\tid: \"recraft/recraft-v4.1-utility\",\n\t\t\tname: \"Recraft: Recraft V4.1 Utility\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"recraft/recraft-v4.1-utility-pro\": {\n\t\t\tid: \"recraft/recraft-v4.1-utility-pro\",\n\t\t\tname: \"Recraft: Recraft V4.1 Utility Pro\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"recraft/recraft-v4.1-vector\": {\n\t\t\tid: \"recraft/recraft-v4.1-vector\",\n\t\t\tname: \"Recraft: Recraft V4.1 Vector\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"sourceful/riverflow-v2-fast\": {\n\t\t\tid: \"sourceful/riverflow-v2-fast\",\n\t\t\tname: \"Sourceful: Riverflow V2 Fast\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"sourceful/riverflow-v2-fast-preview\": {\n\t\t\tid: \"sourceful/riverflow-v2-fast-preview\",\n\t\t\tname: \"Sourceful: Riverflow V2 Fast Preview\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"sourceful/riverflow-v2-max-preview\": {\n\t\t\tid: \"sourceful/riverflow-v2-max-preview\",\n\t\t\tname: \"Sourceful: Riverflow V2 Max Preview\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"sourceful/riverflow-v2-pro\": {\n\t\t\tid: \"sourceful/riverflow-v2-pro\",\n\t\t\tname: \"Sourceful: Riverflow V2 Pro\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"sourceful/riverflow-v2-standard-preview\": {\n\t\t\tid: \"sourceful/riverflow-v2-standard-preview\",\n\t\t\tname: \"Sourceful: Riverflow V2 Standard Preview\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"x-ai/grok-imagine-image-quality\": {\n\t\t\tid: \"x-ai/grok-imagine-image-quality\",\n\t\t\tname: \"xAI: Grok Imagine Image Quality\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t},\n} as const satisfies Record<string, Record<string, ImagesModel<ImagesApi>>>;\n"]}
|
|
@@ -122,6 +122,21 @@ export const IMAGE_MODELS = {
|
|
|
122
122
|
"cacheWrite": 0
|
|
123
123
|
}
|
|
124
124
|
},
|
|
125
|
+
"microsoft/mai-image-2.5": {
|
|
126
|
+
id: "microsoft/mai-image-2.5",
|
|
127
|
+
name: "Microsoft: MAI-Image-2.5",
|
|
128
|
+
api: "openrouter-images",
|
|
129
|
+
provider: "openrouter",
|
|
130
|
+
baseUrl: "https://openrouter.ai/api/v1",
|
|
131
|
+
input: ["text", "image"],
|
|
132
|
+
output: ["image"],
|
|
133
|
+
cost: {
|
|
134
|
+
"input": 5,
|
|
135
|
+
"output": 0,
|
|
136
|
+
"cacheRead": 0,
|
|
137
|
+
"cacheWrite": 0
|
|
138
|
+
}
|
|
139
|
+
},
|
|
125
140
|
"openai/gpt-5-image": {
|
|
126
141
|
id: "openai/gpt-5-image",
|
|
127
142
|
name: "OpenAI: GPT-5 Image",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image-models.generated.js","sourceRoot":"","sources":["../src/image-models.generated.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,uEAAuE;AAIvE,MAAM,CAAC,MAAM,YAAY,GAAG;IAC3B,YAAY,EAAE;QACb,+BAA+B,EAAE;YAChC,EAAE,EAAE,+BAA+B;YACnC,IAAI,EAAE,gCAAgC;YACtC,GAAG,EAAE,mBAAmB;YACxB,QAAQ,EAAE,YAAY;YACtB,OAAO,EAAE,8BAA8B;YACvC,KAAK,EAAE,CAAC,MAAM,EAAC,OAAO,CAAC;YACvB,MAAM,EAAE,CAAC,OAAO,CAAC;YACjB,IAAI,EAAG;gBACP,OAAO,EAAE,CAAC;gBACV,QAAQ,EAAE,CAAC;gBACX,WAAW,EAAE,CAAC;gBACd,YAAY,EAAE,CAAC;aAChB;SAC4C;QAC5C,mCAAmC,EAAE;YACpC,EAAE,EAAE,mCAAmC;YACvC,IAAI,EAAE,oCAAoC;YAC1C,GAAG,EAAE,mBAAmB;YACxB,QAAQ,EAAE,YAAY;YACtB,OAAO,EAAE,8BAA8B;YACvC,KAAK,EAAE,CAAC,MAAM,EAAC,OAAO,CAAC;YACvB,MAAM,EAAE,CAAC,OAAO,CAAC;YACjB,IAAI,EAAG;gBACP,OAAO,EAAE,CAAC;gBACV,QAAQ,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;YACtB,OAAO,EAAE,8BAA8B;YACvC,KAAK,EAAE,CAAC,MAAM,EAAC,OAAO,CAAC;YACvB,MAAM,EAAE,CAAC,OAAO,CAAC;YACjB,IAAI,EAAG;gBACP,OAAO,EAAE,CAAC;gBACV,QAAQ,EAAE,CAAC;gBACX,WAAW,EAAE,CAAC;gBACd,YAAY,EAAE,CAAC;aAChB;SAC4C;KAC5C;CACyE,CAAC","sourcesContent":["// This file is auto-generated by scripts/generate-image-models.ts\n// Do not edit manually - run 'npm run generate-image-models' to update\n\nimport type { ImagesApi, ImagesModel } from \"./types.ts\";\n\nexport const IMAGE_MODELS = {\n\t\"openrouter\": {\n\t\t\"black-forest-labs/flux.2-flex\": {\n\t\t\tid: \"black-forest-labs/flux.2-flex\",\n\t\t\tname: \"Black Forest Labs: FLUX.2 Flex\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"black-forest-labs/flux.2-klein-4b\": {\n\t\t\tid: \"black-forest-labs/flux.2-klein-4b\",\n\t\t\tname: \"Black Forest Labs: FLUX.2 Klein 4B\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"black-forest-labs/flux.2-max\": {\n\t\t\tid: \"black-forest-labs/flux.2-max\",\n\t\t\tname: \"Black Forest Labs: FLUX.2 Max\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"black-forest-labs/flux.2-pro\": {\n\t\t\tid: \"black-forest-labs/flux.2-pro\",\n\t\t\tname: \"Black Forest Labs: FLUX.2 Pro\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"bytedance-seed/seedream-4.5\": {\n\t\t\tid: \"bytedance-seed/seedream-4.5\",\n\t\t\tname: \"ByteDance Seed: Seedream 4.5\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"image\",\"text\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"google/gemini-2.5-flash-image\": {\n\t\t\tid: \"google/gemini-2.5-flash-image\",\n\t\t\tname: \"Google: Nano Banana (Gemini 2.5 Flash Image)\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"image\",\"text\"],\n\t\t\toutput: [\"image\",\"text\"],\n\t\t\tcost: \t{\n\t \"input\": 0.3,\n\t \"output\": 2.5,\n\t \"cacheRead\": 0.03,\n\t \"cacheWrite\": 0.08333333333333334\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"google/gemini-3-pro-image-preview\": {\n\t\t\tid: \"google/gemini-3-pro-image-preview\",\n\t\t\tname: \"Google: Nano Banana Pro (Gemini 3 Pro Image Preview)\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"image\",\"text\"],\n\t\t\toutput: [\"image\",\"text\"],\n\t\t\tcost: \t{\n\t \"input\": 2,\n\t \"output\": 12,\n\t \"cacheRead\": 0.19999999999999998,\n\t \"cacheWrite\": 0.375\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"google/gemini-3.1-flash-image-preview\": {\n\t\t\tid: \"google/gemini-3.1-flash-image-preview\",\n\t\t\tname: \"Google: Nano Banana 2 (Gemini 3.1 Flash Image Preview)\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"image\",\"text\"],\n\t\t\toutput: [\"image\",\"text\"],\n\t\t\tcost: \t{\n\t \"input\": 0.5,\n\t \"output\": 3,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"openai/gpt-5-image\": {\n\t\t\tid: \"openai/gpt-5-image\",\n\t\t\tname: \"OpenAI: GPT-5 Image\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"image\",\"text\"],\n\t\t\toutput: [\"image\",\"text\"],\n\t\t\tcost: \t{\n\t \"input\": 10,\n\t \"output\": 10,\n\t \"cacheRead\": 1.25,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"openai/gpt-5-image-mini\": {\n\t\t\tid: \"openai/gpt-5-image-mini\",\n\t\t\tname: \"OpenAI: GPT-5 Image Mini\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"image\",\"text\"],\n\t\t\toutput: [\"image\",\"text\"],\n\t\t\tcost: \t{\n\t \"input\": 2.5,\n\t \"output\": 2,\n\t \"cacheRead\": 0.25,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"openai/gpt-5.4-image-2\": {\n\t\t\tid: \"openai/gpt-5.4-image-2\",\n\t\t\tname: \"OpenAI: GPT-5.4 Image 2\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"image\",\"text\"],\n\t\t\toutput: [\"image\",\"text\"],\n\t\t\tcost: \t{\n\t \"input\": 8,\n\t \"output\": 15,\n\t \"cacheRead\": 2,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"openrouter/auto\": {\n\t\t\tid: \"openrouter/auto\",\n\t\t\tname: \"Auto Router\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"text\",\"image\"],\n\t\t\tcost: \t{\n\t \"input\": -1000000,\n\t \"output\": -1000000,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"recraft/recraft-v3\": {\n\t\t\tid: \"recraft/recraft-v3\",\n\t\t\tname: \"Recraft: Recraft V3\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"recraft/recraft-v4\": {\n\t\t\tid: \"recraft/recraft-v4\",\n\t\t\tname: \"Recraft: Recraft V4\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"recraft/recraft-v4-pro\": {\n\t\t\tid: \"recraft/recraft-v4-pro\",\n\t\t\tname: \"Recraft: Recraft V4 Pro\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"recraft/recraft-v4-pro-vector\": {\n\t\t\tid: \"recraft/recraft-v4-pro-vector\",\n\t\t\tname: \"Recraft: Recraft V4 Pro Vector\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"recraft/recraft-v4-vector\": {\n\t\t\tid: \"recraft/recraft-v4-vector\",\n\t\t\tname: \"Recraft: Recraft V4 Vector\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"recraft/recraft-v4.1\": {\n\t\t\tid: \"recraft/recraft-v4.1\",\n\t\t\tname: \"Recraft: Recraft V4.1\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"recraft/recraft-v4.1-pro\": {\n\t\t\tid: \"recraft/recraft-v4.1-pro\",\n\t\t\tname: \"Recraft: Recraft V4.1 Pro\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"recraft/recraft-v4.1-pro-vector\": {\n\t\t\tid: \"recraft/recraft-v4.1-pro-vector\",\n\t\t\tname: \"Recraft: Recraft V4.1 Pro Vector\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"recraft/recraft-v4.1-utility\": {\n\t\t\tid: \"recraft/recraft-v4.1-utility\",\n\t\t\tname: \"Recraft: Recraft V4.1 Utility\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"recraft/recraft-v4.1-utility-pro\": {\n\t\t\tid: \"recraft/recraft-v4.1-utility-pro\",\n\t\t\tname: \"Recraft: Recraft V4.1 Utility Pro\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"recraft/recraft-v4.1-vector\": {\n\t\t\tid: \"recraft/recraft-v4.1-vector\",\n\t\t\tname: \"Recraft: Recraft V4.1 Vector\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"sourceful/riverflow-v2-fast\": {\n\t\t\tid: \"sourceful/riverflow-v2-fast\",\n\t\t\tname: \"Sourceful: Riverflow V2 Fast\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"sourceful/riverflow-v2-fast-preview\": {\n\t\t\tid: \"sourceful/riverflow-v2-fast-preview\",\n\t\t\tname: \"Sourceful: Riverflow V2 Fast Preview\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"sourceful/riverflow-v2-max-preview\": {\n\t\t\tid: \"sourceful/riverflow-v2-max-preview\",\n\t\t\tname: \"Sourceful: Riverflow V2 Max Preview\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"sourceful/riverflow-v2-pro\": {\n\t\t\tid: \"sourceful/riverflow-v2-pro\",\n\t\t\tname: \"Sourceful: Riverflow V2 Pro\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"sourceful/riverflow-v2-standard-preview\": {\n\t\t\tid: \"sourceful/riverflow-v2-standard-preview\",\n\t\t\tname: \"Sourceful: Riverflow V2 Standard Preview\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"x-ai/grok-imagine-image-quality\": {\n\t\t\tid: \"x-ai/grok-imagine-image-quality\",\n\t\t\tname: \"xAI: Grok Imagine Image Quality\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t},\n} as const satisfies Record<string, Record<string, ImagesModel<ImagesApi>>>;\n"]}
|
|
1
|
+
{"version":3,"file":"image-models.generated.js","sourceRoot":"","sources":["../src/image-models.generated.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,uEAAuE;AAIvE,MAAM,CAAC,MAAM,YAAY,GAAG;IAC3B,YAAY,EAAE;QACb,+BAA+B,EAAE;YAChC,EAAE,EAAE,+BAA+B;YACnC,IAAI,EAAE,gCAAgC;YACtC,GAAG,EAAE,mBAAmB;YACxB,QAAQ,EAAE,YAAY;YACtB,OAAO,EAAE,8BAA8B;YACvC,KAAK,EAAE,CAAC,MAAM,EAAC,OAAO,CAAC;YACvB,MAAM,EAAE,CAAC,OAAO,CAAC;YACjB,IAAI,EAAG;gBACP,OAAO,EAAE,CAAC;gBACV,QAAQ,EAAE,CAAC;gBACX,WAAW,EAAE,CAAC;gBACd,YAAY,EAAE,CAAC;aAChB;SAC4C;QAC5C,mCAAmC,EAAE;YACpC,EAAE,EAAE,mCAAmC;YACvC,IAAI,EAAE,oCAAoC;YAC1C,GAAG,EAAE,mBAAmB;YACxB,QAAQ,EAAE,YAAY;YACtB,OAAO,EAAE,8BAA8B;YACvC,KAAK,EAAE,CAAC,MAAM,EAAC,OAAO,CAAC;YACvB,MAAM,EAAE,CAAC,OAAO,CAAC;YACjB,IAAI,EAAG;gBACP,OAAO,EAAE,CAAC;gBACV,QAAQ,EAAE,CAAC;gBACX,WAAW,EAAE,CAAC;gBACd,YAAY,EAAE,CAAC;aAChB;SAC4C;QAC5C,8BAA8B,EAAE;YAC/B,EAAE,EAAE,8BAA8B;YAClC,IAAI,EAAE,+BAA+B;YACrC,GAAG,EAAE,mBAAmB;YACxB,QAAQ,EAAE,YAAY;YACtB,OAAO,EAAE,8BAA8B;YACvC,KAAK,EAAE,CAAC,MAAM,EAAC,OAAO,CAAC;YACvB,MAAM,EAAE,CAAC,OAAO,CAAC;YACj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C;YACvC,GAAG,EAAE,mBAAmB;YACxB,QAAQ,EAAE,YAAY;YACtB,OAAO,EAAE,8BAA8B;YACvC,KAAK,EAAE,CAAC,MAAM,EAAC,OAAO,CAAC;YACvB,MAAM,EAAE,CAAC,OAAO,CAAC;YACjB,IAAI,EAAG;gBACP,OAAO,EAAE,CAAC;gBACV,QAAQ,EAAE,CAAC;gBACX,WAAW,EAAE,CAAC;gBACd,YAAY,EAAE,CAAC;aAChB;SAC4C;KAC5C;CACyE,CAAC","sourcesContent":["// This file is auto-generated by scripts/generate-image-models.ts\n// Do not edit manually - run 'npm run generate-image-models' to update\n\nimport type { ImagesApi, ImagesModel } from \"./types.ts\";\n\nexport const IMAGE_MODELS = {\n\t\"openrouter\": {\n\t\t\"black-forest-labs/flux.2-flex\": {\n\t\t\tid: \"black-forest-labs/flux.2-flex\",\n\t\t\tname: \"Black Forest Labs: FLUX.2 Flex\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"black-forest-labs/flux.2-klein-4b\": {\n\t\t\tid: \"black-forest-labs/flux.2-klein-4b\",\n\t\t\tname: \"Black Forest Labs: FLUX.2 Klein 4B\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"black-forest-labs/flux.2-max\": {\n\t\t\tid: \"black-forest-labs/flux.2-max\",\n\t\t\tname: \"Black Forest Labs: FLUX.2 Max\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"black-forest-labs/flux.2-pro\": {\n\t\t\tid: \"black-forest-labs/flux.2-pro\",\n\t\t\tname: \"Black Forest Labs: FLUX.2 Pro\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"bytedance-seed/seedream-4.5\": {\n\t\t\tid: \"bytedance-seed/seedream-4.5\",\n\t\t\tname: \"ByteDance Seed: Seedream 4.5\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"image\",\"text\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"google/gemini-2.5-flash-image\": {\n\t\t\tid: \"google/gemini-2.5-flash-image\",\n\t\t\tname: \"Google: Nano Banana (Gemini 2.5 Flash Image)\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"image\",\"text\"],\n\t\t\toutput: [\"image\",\"text\"],\n\t\t\tcost: \t{\n\t \"input\": 0.3,\n\t \"output\": 2.5,\n\t \"cacheRead\": 0.03,\n\t \"cacheWrite\": 0.08333333333333334\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"google/gemini-3-pro-image-preview\": {\n\t\t\tid: \"google/gemini-3-pro-image-preview\",\n\t\t\tname: \"Google: Nano Banana Pro (Gemini 3 Pro Image Preview)\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"image\",\"text\"],\n\t\t\toutput: [\"image\",\"text\"],\n\t\t\tcost: \t{\n\t \"input\": 2,\n\t \"output\": 12,\n\t \"cacheRead\": 0.19999999999999998,\n\t \"cacheWrite\": 0.375\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"google/gemini-3.1-flash-image-preview\": {\n\t\t\tid: \"google/gemini-3.1-flash-image-preview\",\n\t\t\tname: \"Google: Nano Banana 2 (Gemini 3.1 Flash Image Preview)\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"image\",\"text\"],\n\t\t\toutput: [\"image\",\"text\"],\n\t\t\tcost: \t{\n\t \"input\": 0.5,\n\t \"output\": 3,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"microsoft/mai-image-2.5\": {\n\t\t\tid: \"microsoft/mai-image-2.5\",\n\t\t\tname: \"Microsoft: MAI-Image-2.5\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 5,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"openai/gpt-5-image\": {\n\t\t\tid: \"openai/gpt-5-image\",\n\t\t\tname: \"OpenAI: GPT-5 Image\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"image\",\"text\"],\n\t\t\toutput: [\"image\",\"text\"],\n\t\t\tcost: \t{\n\t \"input\": 10,\n\t \"output\": 10,\n\t \"cacheRead\": 1.25,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"openai/gpt-5-image-mini\": {\n\t\t\tid: \"openai/gpt-5-image-mini\",\n\t\t\tname: \"OpenAI: GPT-5 Image Mini\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"image\",\"text\"],\n\t\t\toutput: [\"image\",\"text\"],\n\t\t\tcost: \t{\n\t \"input\": 2.5,\n\t \"output\": 2,\n\t \"cacheRead\": 0.25,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"openai/gpt-5.4-image-2\": {\n\t\t\tid: \"openai/gpt-5.4-image-2\",\n\t\t\tname: \"OpenAI: GPT-5.4 Image 2\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"image\",\"text\"],\n\t\t\toutput: [\"image\",\"text\"],\n\t\t\tcost: \t{\n\t \"input\": 8,\n\t \"output\": 15,\n\t \"cacheRead\": 2,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"openrouter/auto\": {\n\t\t\tid: \"openrouter/auto\",\n\t\t\tname: \"Auto Router\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"text\",\"image\"],\n\t\t\tcost: \t{\n\t \"input\": -1000000,\n\t \"output\": -1000000,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"recraft/recraft-v3\": {\n\t\t\tid: \"recraft/recraft-v3\",\n\t\t\tname: \"Recraft: Recraft V3\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"recraft/recraft-v4\": {\n\t\t\tid: \"recraft/recraft-v4\",\n\t\t\tname: \"Recraft: Recraft V4\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"recraft/recraft-v4-pro\": {\n\t\t\tid: \"recraft/recraft-v4-pro\",\n\t\t\tname: \"Recraft: Recraft V4 Pro\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"recraft/recraft-v4-pro-vector\": {\n\t\t\tid: \"recraft/recraft-v4-pro-vector\",\n\t\t\tname: \"Recraft: Recraft V4 Pro Vector\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"recraft/recraft-v4-vector\": {\n\t\t\tid: \"recraft/recraft-v4-vector\",\n\t\t\tname: \"Recraft: Recraft V4 Vector\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"recraft/recraft-v4.1\": {\n\t\t\tid: \"recraft/recraft-v4.1\",\n\t\t\tname: \"Recraft: Recraft V4.1\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"recraft/recraft-v4.1-pro\": {\n\t\t\tid: \"recraft/recraft-v4.1-pro\",\n\t\t\tname: \"Recraft: Recraft V4.1 Pro\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"recraft/recraft-v4.1-pro-vector\": {\n\t\t\tid: \"recraft/recraft-v4.1-pro-vector\",\n\t\t\tname: \"Recraft: Recraft V4.1 Pro Vector\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"recraft/recraft-v4.1-utility\": {\n\t\t\tid: \"recraft/recraft-v4.1-utility\",\n\t\t\tname: \"Recraft: Recraft V4.1 Utility\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"recraft/recraft-v4.1-utility-pro\": {\n\t\t\tid: \"recraft/recraft-v4.1-utility-pro\",\n\t\t\tname: \"Recraft: Recraft V4.1 Utility Pro\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"recraft/recraft-v4.1-vector\": {\n\t\t\tid: \"recraft/recraft-v4.1-vector\",\n\t\t\tname: \"Recraft: Recraft V4.1 Vector\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"sourceful/riverflow-v2-fast\": {\n\t\t\tid: \"sourceful/riverflow-v2-fast\",\n\t\t\tname: \"Sourceful: Riverflow V2 Fast\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"sourceful/riverflow-v2-fast-preview\": {\n\t\t\tid: \"sourceful/riverflow-v2-fast-preview\",\n\t\t\tname: \"Sourceful: Riverflow V2 Fast Preview\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"sourceful/riverflow-v2-max-preview\": {\n\t\t\tid: \"sourceful/riverflow-v2-max-preview\",\n\t\t\tname: \"Sourceful: Riverflow V2 Max Preview\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"sourceful/riverflow-v2-pro\": {\n\t\t\tid: \"sourceful/riverflow-v2-pro\",\n\t\t\tname: \"Sourceful: Riverflow V2 Pro\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"sourceful/riverflow-v2-standard-preview\": {\n\t\t\tid: \"sourceful/riverflow-v2-standard-preview\",\n\t\t\tname: \"Sourceful: Riverflow V2 Standard Preview\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t\t\"x-ai/grok-imagine-image-quality\": {\n\t\t\tid: \"x-ai/grok-imagine-image-quality\",\n\t\t\tname: \"xAI: Grok Imagine Image Quality\",\n\t\t\tapi: \"openrouter-images\",\n\t\t\tprovider: \"openrouter\",\n\t\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\t\tinput: [\"text\",\"image\"],\n\t\t\toutput: [\"image\"],\n\t\t\tcost: \t{\n\t \"input\": 0,\n\t \"output\": 0,\n\t \"cacheRead\": 0,\n\t \"cacheWrite\": 0\n\t}\n\t\t} satisfies ImagesModel<\"openrouter-images\">,\n\t},\n} as const satisfies Record<string, Record<string, ImagesModel<ImagesApi>>>;\n"]}
|