@mariozechner/pi-ai 0.54.2 → 0.55.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/dist/env-api-keys.d.ts.map +1 -1
- package/dist/env-api-keys.js +8 -2
- package/dist/env-api-keys.js.map +1 -1
- package/dist/models.generated.d.ts +182 -12
- package/dist/models.generated.d.ts.map +1 -1
- package/dist/models.generated.js +203 -33
- package/dist/models.generated.js.map +1 -1
- package/dist/providers/amazon-bedrock.d.ts.map +1 -1
- package/dist/providers/amazon-bedrock.js +8 -5
- package/dist/providers/amazon-bedrock.js.map +1 -1
- package/dist/providers/anthropic.d.ts +4 -4
- package/dist/providers/anthropic.d.ts.map +1 -1
- package/dist/providers/anthropic.js +13 -9
- package/dist/providers/anthropic.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env-api-keys.d.ts","sourceRoot":"","sources":["../src/env-api-keys.ts"],"names":[],"mappings":"AAkBA,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":"AAkBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAgChD;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,aAAa,GAAG,MAAM,GAAG,SAAS,CAAC;AAC1E,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC","sourcesContent":["// NEVER convert to top-level imports - breaks browser/Vite builds (web-ui)\nlet _existsSync: typeof import(\"node:fs\").existsSync | null = null;\nlet _homedir: typeof import(\"node:os\").homedir | null = null;\nlet _join: typeof import(\"node:path\").join | null = null;\n\n// Eagerly load in Node.js/Bun environment only\nif (typeof process !== \"undefined\" && (process.versions?.node || process.versions?.bun)) {\n\timport(\"node:fs\").then((m) => {\n\t\t_existsSync = m.existsSync;\n\t});\n\timport(\"node:os\").then((m) => {\n\t\t_homedir = m.homedir;\n\t});\n\timport(\"node:path\").then((m) => {\n\t\t_join = m.join;\n\t});\n}\n\nimport type { KnownProvider } from \"./types.js\";\n\nlet cachedVertexAdcCredentialsExists: boolean | null = null;\n\nfunction hasVertexAdcCredentials(): boolean {\n\tif (cachedVertexAdcCredentialsExists === null) {\n\t\t// If node modules haven't loaded yet (async import race at startup),\n\t\t// return false WITHOUT caching so the next call retries once they're ready.\n\t\t// Only cache false permanently in a browser environment where fs is never available.\n\t\tif (!_existsSync || !_homedir || !_join) {\n\t\t\tconst isNode = typeof process !== \"undefined\" && (process.versions?.node || process.versions?.bun);\n\t\t\tif (!isNode) {\n\t\t\t\t// Definitively in a browser — safe to cache false permanently\n\t\t\t\tcachedVertexAdcCredentialsExists = false;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\n\t\t// Check GOOGLE_APPLICATION_CREDENTIALS env var first (standard way)\n\t\tconst gacPath = process.env.GOOGLE_APPLICATION_CREDENTIALS;\n\t\tif (gacPath) {\n\t\t\tcachedVertexAdcCredentialsExists = _existsSync(gacPath);\n\t\t} else {\n\t\t\t// Fall back to default ADC path (lazy evaluation)\n\t\t\tcachedVertexAdcCredentialsExists = _existsSync(\n\t\t\t\t_join(_homedir(), \".config\", \"gcloud\", \"application_default_credentials.json\"),\n\t\t\t);\n\t\t}\n\t}\n\treturn cachedVertexAdcCredentialsExists;\n}\n\n/**\n * Get API key for provider from known environment variables, e.g. OPENAI_API_KEY.\n *\n * Will not return API keys for providers that require OAuth tokens.\n */\nexport function getEnvApiKey(provider: KnownProvider): string | undefined;\nexport function getEnvApiKey(provider: string): string | undefined;\nexport function getEnvApiKey(provider: any): string | undefined {\n\t// Fall back to environment variables\n\tif (provider === \"github-copilot\") {\n\t\treturn process.env.COPILOT_GITHUB_TOKEN || process.env.GH_TOKEN || process.env.GITHUB_TOKEN;\n\t}\n\n\t// ANTHROPIC_OAUTH_TOKEN takes precedence over ANTHROPIC_API_KEY\n\tif (provider === \"anthropic\") {\n\t\treturn process.env.ANTHROPIC_OAUTH_TOKEN || process.env.ANTHROPIC_API_KEY;\n\t}\n\n\t// Vertex AI uses Application Default Credentials, not API keys.\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 = !!(process.env.GOOGLE_CLOUD_PROJECT || process.env.GCLOUD_PROJECT);\n\t\tconst hasLocation = !!process.env.GOOGLE_CLOUD_LOCATION;\n\n\t\tif (hasCredentials && hasProject && hasLocation) {\n\t\t\treturn \"<authenticated>\";\n\t\t}\n\t}\n\n\tif (provider === \"amazon-bedrock\") {\n\t\t// Amazon Bedrock supports multiple credential sources:\n\t\t// 1. AWS_PROFILE - named profile from ~/.aws/credentials\n\t\t// 2. AWS_ACCESS_KEY_ID + AWS_SECRET_ACCESS_KEY - standard IAM keys\n\t\t// 3. AWS_BEARER_TOKEN_BEDROCK - Bedrock API keys (bearer token)\n\t\t// 4. AWS_CONTAINER_CREDENTIALS_RELATIVE_URI - ECS task roles\n\t\t// 5. AWS_CONTAINER_CREDENTIALS_FULL_URI - ECS task roles (full URI)\n\t\t// 6. AWS_WEB_IDENTITY_TOKEN_FILE - IRSA (IAM Roles for Service Accounts)\n\t\tif (\n\t\t\tprocess.env.AWS_PROFILE ||\n\t\t\t(process.env.AWS_ACCESS_KEY_ID && process.env.AWS_SECRET_ACCESS_KEY) ||\n\t\t\tprocess.env.AWS_BEARER_TOKEN_BEDROCK ||\n\t\t\tprocess.env.AWS_CONTAINER_CREDENTIALS_RELATIVE_URI ||\n\t\t\tprocess.env.AWS_CONTAINER_CREDENTIALS_FULL_URI ||\n\t\t\tprocess.env.AWS_WEB_IDENTITY_TOKEN_FILE\n\t\t) {\n\t\t\treturn \"<authenticated>\";\n\t\t}\n\t}\n\n\tconst envMap: Record<string, string> = {\n\t\topenai: \"OPENAI_API_KEY\",\n\t\t\"azure-openai-responses\": \"AZURE_OPENAI_API_KEY\",\n\t\tgoogle: \"GEMINI_API_KEY\",\n\t\tgroq: \"GROQ_API_KEY\",\n\t\tcerebras: \"CEREBRAS_API_KEY\",\n\t\txai: \"XAI_API_KEY\",\n\t\topenrouter: \"OPENROUTER_API_KEY\",\n\t\t\"vercel-ai-gateway\": \"AI_GATEWAY_API_KEY\",\n\t\tzai: \"ZAI_API_KEY\",\n\t\tmistral: \"MISTRAL_API_KEY\",\n\t\tminimax: \"MINIMAX_API_KEY\",\n\t\t\"minimax-cn\": \"MINIMAX_CN_API_KEY\",\n\t\thuggingface: \"HF_TOKEN\",\n\t\topencode: \"OPENCODE_API_KEY\",\n\t\t\"kimi-coding\": \"KIMI_API_KEY\",\n\t};\n\n\tconst envVar = envMap[provider];\n\treturn envVar ? process.env[envVar] : undefined;\n}\n"]}
|
package/dist/env-api-keys.js
CHANGED
|
@@ -17,9 +17,15 @@ if (typeof process !== "undefined" && (process.versions?.node || process.version
|
|
|
17
17
|
let cachedVertexAdcCredentialsExists = null;
|
|
18
18
|
function hasVertexAdcCredentials() {
|
|
19
19
|
if (cachedVertexAdcCredentialsExists === null) {
|
|
20
|
-
//
|
|
20
|
+
// If node modules haven't loaded yet (async import race at startup),
|
|
21
|
+
// return false WITHOUT caching so the next call retries once they're ready.
|
|
22
|
+
// Only cache false permanently in a browser environment where fs is never available.
|
|
21
23
|
if (!_existsSync || !_homedir || !_join) {
|
|
22
|
-
|
|
24
|
+
const isNode = typeof process !== "undefined" && (process.versions?.node || process.versions?.bun);
|
|
25
|
+
if (!isNode) {
|
|
26
|
+
// Definitively in a browser — safe to cache false permanently
|
|
27
|
+
cachedVertexAdcCredentialsExists = false;
|
|
28
|
+
}
|
|
23
29
|
return false;
|
|
24
30
|
}
|
|
25
31
|
// Check GOOGLE_APPLICATION_CREDENTIALS env var first (standard way)
|
package/dist/env-api-keys.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env-api-keys.js","sourceRoot":"","sources":["../src/env-api-keys.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,IAAI,WAAW,GAA+C,IAAI,CAAC;AACnE,IAAI,QAAQ,GAA4C,IAAI,CAAC;AAC7D,IAAI,KAAK,GAA2C,IAAI,CAAC;AAEzD,+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,MAAM,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;QAC7B,WAAW,GAAG,CAAC,CAAC,UAAU,CAAC;IAAA,CAC3B,CAAC,CAAC;IACH,MAAM,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;QAC7B,QAAQ,GAAG,CAAC,CAAC,OAAO,CAAC;IAAA,CACrB,CAAC,CAAC;IACH,MAAM,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;QAC/B,KAAK,GAAG,CAAC,CAAC,IAAI,CAAC;IAAA,CACf,CAAC,CAAC;AACJ,CAAC;AAID,IAAI,gCAAgC,GAAmB,IAAI,CAAC;AAE5D,SAAS,uBAAuB,GAAY;IAC3C,IAAI,gCAAgC,KAAK,IAAI,EAAE,CAAC;QAC/C,
|
|
1
|
+
{"version":3,"file":"env-api-keys.js","sourceRoot":"","sources":["../src/env-api-keys.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,IAAI,WAAW,GAA+C,IAAI,CAAC;AACnE,IAAI,QAAQ,GAA4C,IAAI,CAAC;AAC7D,IAAI,KAAK,GAA2C,IAAI,CAAC;AAEzD,+CAA+C;AAC/C,IAAI,OAAO,OAAO,KAAK,WAAW,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,IAAI,O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;YACpE,OAAO,CAAC,GAAG,CAAC,wBAAwB;YACpC,OAAO,CAAC,GAAG,CAAC,sCAAsC;YAClD,OAAO,CAAC,GAAG,CAAC,kCAAkC;YAC9C,OAAO,CAAC,GAAG,CAAC,2BAA2B,EACtC,CAAC;YACF,OAAO,iBAAiB,CAAC;QAC1B,CAAC;IACF,CAAC;IAED,MAAM,MAAM,GAA2B;QACtC,MAAM,EAAE,gBAAgB;QACxB,wBAAwB,EAAE,sBAAsB;QAChD,MAAM,EAAE,gBAAgB;QACxB,IAAI,EAAE,cAAc;QACpB,QAAQ,EAAE,kBAAkB;QAC5B,GAAG,EAAE,aAAa;QAClB,UAAU,EAAE,oBAAoB;QAChC,mBAAmB,EAAE,oBAAoB;QACzC,GAAG,EAAE,aAAa;QAClB,OAAO,EAAE,iBAAiB;QAC1B,OAAO,EAAE,iBAAiB;QAC1B,YAAY,EAAE,oBAAoB;QAClC,WAAW,EAAE,UAAU;QACvB,QAAQ,EAAE,kBAAkB;QAC5B,aAAa,EAAE,cAAc;KAC7B,CAAC;IAEF,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;IAChC,OAAO,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAAA,CAChD","sourcesContent":["// NEVER convert to top-level imports - breaks browser/Vite builds (web-ui)\nlet _existsSync: typeof import(\"node:fs\").existsSync | null = null;\nlet _homedir: typeof import(\"node:os\").homedir | null = null;\nlet _join: typeof import(\"node:path\").join | null = null;\n\n// Eagerly load in Node.js/Bun environment only\nif (typeof process !== \"undefined\" && (process.versions?.node || process.versions?.bun)) {\n\timport(\"node:fs\").then((m) => {\n\t\t_existsSync = m.existsSync;\n\t});\n\timport(\"node:os\").then((m) => {\n\t\t_homedir = m.homedir;\n\t});\n\timport(\"node:path\").then((m) => {\n\t\t_join = m.join;\n\t});\n}\n\nimport type { KnownProvider } from \"./types.js\";\n\nlet cachedVertexAdcCredentialsExists: boolean | null = null;\n\nfunction hasVertexAdcCredentials(): boolean {\n\tif (cachedVertexAdcCredentialsExists === null) {\n\t\t// If node modules haven't loaded yet (async import race at startup),\n\t\t// return false WITHOUT caching so the next call retries once they're ready.\n\t\t// Only cache false permanently in a browser environment where fs is never available.\n\t\tif (!_existsSync || !_homedir || !_join) {\n\t\t\tconst isNode = typeof process !== \"undefined\" && (process.versions?.node || process.versions?.bun);\n\t\t\tif (!isNode) {\n\t\t\t\t// Definitively in a browser — safe to cache false permanently\n\t\t\t\tcachedVertexAdcCredentialsExists = false;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\n\t\t// Check GOOGLE_APPLICATION_CREDENTIALS env var first (standard way)\n\t\tconst gacPath = process.env.GOOGLE_APPLICATION_CREDENTIALS;\n\t\tif (gacPath) {\n\t\t\tcachedVertexAdcCredentialsExists = _existsSync(gacPath);\n\t\t} else {\n\t\t\t// Fall back to default ADC path (lazy evaluation)\n\t\t\tcachedVertexAdcCredentialsExists = _existsSync(\n\t\t\t\t_join(_homedir(), \".config\", \"gcloud\", \"application_default_credentials.json\"),\n\t\t\t);\n\t\t}\n\t}\n\treturn cachedVertexAdcCredentialsExists;\n}\n\n/**\n * Get API key for provider from known environment variables, e.g. OPENAI_API_KEY.\n *\n * Will not return API keys for providers that require OAuth tokens.\n */\nexport function getEnvApiKey(provider: KnownProvider): string | undefined;\nexport function getEnvApiKey(provider: string): string | undefined;\nexport function getEnvApiKey(provider: any): string | undefined {\n\t// Fall back to environment variables\n\tif (provider === \"github-copilot\") {\n\t\treturn process.env.COPILOT_GITHUB_TOKEN || process.env.GH_TOKEN || process.env.GITHUB_TOKEN;\n\t}\n\n\t// ANTHROPIC_OAUTH_TOKEN takes precedence over ANTHROPIC_API_KEY\n\tif (provider === \"anthropic\") {\n\t\treturn process.env.ANTHROPIC_OAUTH_TOKEN || process.env.ANTHROPIC_API_KEY;\n\t}\n\n\t// Vertex AI uses Application Default Credentials, not API keys.\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 = !!(process.env.GOOGLE_CLOUD_PROJECT || process.env.GCLOUD_PROJECT);\n\t\tconst hasLocation = !!process.env.GOOGLE_CLOUD_LOCATION;\n\n\t\tif (hasCredentials && hasProject && hasLocation) {\n\t\t\treturn \"<authenticated>\";\n\t\t}\n\t}\n\n\tif (provider === \"amazon-bedrock\") {\n\t\t// Amazon Bedrock supports multiple credential sources:\n\t\t// 1. AWS_PROFILE - named profile from ~/.aws/credentials\n\t\t// 2. AWS_ACCESS_KEY_ID + AWS_SECRET_ACCESS_KEY - standard IAM keys\n\t\t// 3. AWS_BEARER_TOKEN_BEDROCK - Bedrock API keys (bearer token)\n\t\t// 4. AWS_CONTAINER_CREDENTIALS_RELATIVE_URI - ECS task roles\n\t\t// 5. AWS_CONTAINER_CREDENTIALS_FULL_URI - ECS task roles (full URI)\n\t\t// 6. AWS_WEB_IDENTITY_TOKEN_FILE - IRSA (IAM Roles for Service Accounts)\n\t\tif (\n\t\t\tprocess.env.AWS_PROFILE ||\n\t\t\t(process.env.AWS_ACCESS_KEY_ID && process.env.AWS_SECRET_ACCESS_KEY) ||\n\t\t\tprocess.env.AWS_BEARER_TOKEN_BEDROCK ||\n\t\t\tprocess.env.AWS_CONTAINER_CREDENTIALS_RELATIVE_URI ||\n\t\t\tprocess.env.AWS_CONTAINER_CREDENTIALS_FULL_URI ||\n\t\t\tprocess.env.AWS_WEB_IDENTITY_TOKEN_FILE\n\t\t) {\n\t\t\treturn \"<authenticated>\";\n\t\t}\n\t}\n\n\tconst envMap: Record<string, string> = {\n\t\topenai: \"OPENAI_API_KEY\",\n\t\t\"azure-openai-responses\": \"AZURE_OPENAI_API_KEY\",\n\t\tgoogle: \"GEMINI_API_KEY\",\n\t\tgroq: \"GROQ_API_KEY\",\n\t\tcerebras: \"CEREBRAS_API_KEY\",\n\t\txai: \"XAI_API_KEY\",\n\t\topenrouter: \"OPENROUTER_API_KEY\",\n\t\t\"vercel-ai-gateway\": \"AI_GATEWAY_API_KEY\",\n\t\tzai: \"ZAI_API_KEY\",\n\t\tmistral: \"MISTRAL_API_KEY\",\n\t\tminimax: \"MINIMAX_API_KEY\",\n\t\t\"minimax-cn\": \"MINIMAX_CN_API_KEY\",\n\t\thuggingface: \"HF_TOKEN\",\n\t\topencode: \"OPENCODE_API_KEY\",\n\t\t\"kimi-coding\": \"KIMI_API_KEY\",\n\t};\n\n\tconst envVar = envMap[provider];\n\treturn envVar ? process.env[envVar] : undefined;\n}\n"]}
|
|
@@ -3626,6 +3626,23 @@ export declare const MODELS: {
|
|
|
3626
3626
|
contextWindow: number;
|
|
3627
3627
|
maxTokens: number;
|
|
3628
3628
|
};
|
|
3629
|
+
readonly "gemini-3.1-pro-preview": {
|
|
3630
|
+
id: string;
|
|
3631
|
+
name: string;
|
|
3632
|
+
api: "google-gemini-cli";
|
|
3633
|
+
provider: string;
|
|
3634
|
+
baseUrl: string;
|
|
3635
|
+
reasoning: true;
|
|
3636
|
+
input: ("image" | "text")[];
|
|
3637
|
+
cost: {
|
|
3638
|
+
input: number;
|
|
3639
|
+
output: number;
|
|
3640
|
+
cacheRead: number;
|
|
3641
|
+
cacheWrite: number;
|
|
3642
|
+
};
|
|
3643
|
+
contextWindow: number;
|
|
3644
|
+
maxTokens: number;
|
|
3645
|
+
};
|
|
3629
3646
|
};
|
|
3630
3647
|
readonly "google-vertex": {
|
|
3631
3648
|
readonly "gemini-1.5-flash": {
|
|
@@ -6046,14 +6063,14 @@ export declare const MODELS: {
|
|
|
6046
6063
|
contextWindow: number;
|
|
6047
6064
|
maxTokens: number;
|
|
6048
6065
|
};
|
|
6049
|
-
readonly "
|
|
6066
|
+
readonly "gpt-5": {
|
|
6050
6067
|
id: string;
|
|
6051
6068
|
name: string;
|
|
6052
|
-
api: "openai-
|
|
6069
|
+
api: "openai-responses";
|
|
6053
6070
|
provider: string;
|
|
6054
6071
|
baseUrl: string;
|
|
6055
6072
|
reasoning: true;
|
|
6056
|
-
input: "text"[];
|
|
6073
|
+
input: ("image" | "text")[];
|
|
6057
6074
|
cost: {
|
|
6058
6075
|
input: number;
|
|
6059
6076
|
output: number;
|
|
@@ -6063,7 +6080,7 @@ export declare const MODELS: {
|
|
|
6063
6080
|
contextWindow: number;
|
|
6064
6081
|
maxTokens: number;
|
|
6065
6082
|
};
|
|
6066
|
-
readonly "gpt-5": {
|
|
6083
|
+
readonly "gpt-5-codex": {
|
|
6067
6084
|
id: string;
|
|
6068
6085
|
name: string;
|
|
6069
6086
|
api: "openai-responses";
|
|
@@ -6080,7 +6097,7 @@ export declare const MODELS: {
|
|
|
6080
6097
|
contextWindow: number;
|
|
6081
6098
|
maxTokens: number;
|
|
6082
6099
|
};
|
|
6083
|
-
readonly "gpt-5-
|
|
6100
|
+
readonly "gpt-5-nano": {
|
|
6084
6101
|
id: string;
|
|
6085
6102
|
name: string;
|
|
6086
6103
|
api: "openai-responses";
|
|
@@ -6097,7 +6114,7 @@ export declare const MODELS: {
|
|
|
6097
6114
|
contextWindow: number;
|
|
6098
6115
|
maxTokens: number;
|
|
6099
6116
|
};
|
|
6100
|
-
readonly "gpt-5
|
|
6117
|
+
readonly "gpt-5.1": {
|
|
6101
6118
|
id: string;
|
|
6102
6119
|
name: string;
|
|
6103
6120
|
api: "openai-responses";
|
|
@@ -6114,7 +6131,7 @@ export declare const MODELS: {
|
|
|
6114
6131
|
contextWindow: number;
|
|
6115
6132
|
maxTokens: number;
|
|
6116
6133
|
};
|
|
6117
|
-
readonly "gpt-5.1": {
|
|
6134
|
+
readonly "gpt-5.1-codex": {
|
|
6118
6135
|
id: string;
|
|
6119
6136
|
name: string;
|
|
6120
6137
|
api: "openai-responses";
|
|
@@ -6131,7 +6148,7 @@ export declare const MODELS: {
|
|
|
6131
6148
|
contextWindow: number;
|
|
6132
6149
|
maxTokens: number;
|
|
6133
6150
|
};
|
|
6134
|
-
readonly "gpt-5.1-codex": {
|
|
6151
|
+
readonly "gpt-5.1-codex-max": {
|
|
6135
6152
|
id: string;
|
|
6136
6153
|
name: string;
|
|
6137
6154
|
api: "openai-responses";
|
|
@@ -6148,7 +6165,7 @@ export declare const MODELS: {
|
|
|
6148
6165
|
contextWindow: number;
|
|
6149
6166
|
maxTokens: number;
|
|
6150
6167
|
};
|
|
6151
|
-
readonly "gpt-5.1-codex-
|
|
6168
|
+
readonly "gpt-5.1-codex-mini": {
|
|
6152
6169
|
id: string;
|
|
6153
6170
|
name: string;
|
|
6154
6171
|
api: "openai-responses";
|
|
@@ -6165,7 +6182,7 @@ export declare const MODELS: {
|
|
|
6165
6182
|
contextWindow: number;
|
|
6166
6183
|
maxTokens: number;
|
|
6167
6184
|
};
|
|
6168
|
-
readonly "gpt-5.
|
|
6185
|
+
readonly "gpt-5.2": {
|
|
6169
6186
|
id: string;
|
|
6170
6187
|
name: string;
|
|
6171
6188
|
api: "openai-responses";
|
|
@@ -6182,7 +6199,7 @@ export declare const MODELS: {
|
|
|
6182
6199
|
contextWindow: number;
|
|
6183
6200
|
maxTokens: number;
|
|
6184
6201
|
};
|
|
6185
|
-
readonly "gpt-5.2": {
|
|
6202
|
+
readonly "gpt-5.2-codex": {
|
|
6186
6203
|
id: string;
|
|
6187
6204
|
name: string;
|
|
6188
6205
|
api: "openai-responses";
|
|
@@ -6199,7 +6216,7 @@ export declare const MODELS: {
|
|
|
6199
6216
|
contextWindow: number;
|
|
6200
6217
|
maxTokens: number;
|
|
6201
6218
|
};
|
|
6202
|
-
readonly "gpt-5.
|
|
6219
|
+
readonly "gpt-5.3-codex": {
|
|
6203
6220
|
id: string;
|
|
6204
6221
|
name: string;
|
|
6205
6222
|
api: "openai-responses";
|
|
@@ -7221,6 +7238,23 @@ export declare const MODELS: {
|
|
|
7221
7238
|
contextWindow: number;
|
|
7222
7239
|
maxTokens: number;
|
|
7223
7240
|
};
|
|
7241
|
+
readonly "google/gemini-3.1-pro-preview-customtools": {
|
|
7242
|
+
id: string;
|
|
7243
|
+
name: string;
|
|
7244
|
+
api: "openai-completions";
|
|
7245
|
+
provider: string;
|
|
7246
|
+
baseUrl: string;
|
|
7247
|
+
reasoning: true;
|
|
7248
|
+
input: ("image" | "text")[];
|
|
7249
|
+
cost: {
|
|
7250
|
+
input: number;
|
|
7251
|
+
output: number;
|
|
7252
|
+
cacheRead: number;
|
|
7253
|
+
cacheWrite: number;
|
|
7254
|
+
};
|
|
7255
|
+
contextWindow: number;
|
|
7256
|
+
maxTokens: number;
|
|
7257
|
+
};
|
|
7224
7258
|
readonly "google/gemma-3-27b-it": {
|
|
7225
7259
|
id: string;
|
|
7226
7260
|
name: string;
|
|
@@ -7306,6 +7340,23 @@ export declare const MODELS: {
|
|
|
7306
7340
|
contextWindow: number;
|
|
7307
7341
|
maxTokens: number;
|
|
7308
7342
|
};
|
|
7343
|
+
readonly "meituan/longcat-flash-chat": {
|
|
7344
|
+
id: string;
|
|
7345
|
+
name: string;
|
|
7346
|
+
api: "openai-completions";
|
|
7347
|
+
provider: string;
|
|
7348
|
+
baseUrl: string;
|
|
7349
|
+
reasoning: false;
|
|
7350
|
+
input: "text"[];
|
|
7351
|
+
cost: {
|
|
7352
|
+
input: number;
|
|
7353
|
+
output: number;
|
|
7354
|
+
cacheRead: number;
|
|
7355
|
+
cacheWrite: number;
|
|
7356
|
+
};
|
|
7357
|
+
contextWindow: number;
|
|
7358
|
+
maxTokens: number;
|
|
7359
|
+
};
|
|
7309
7360
|
readonly "meta-llama/llama-3-8b-instruct": {
|
|
7310
7361
|
id: string;
|
|
7311
7362
|
name: string;
|
|
@@ -8717,6 +8768,23 @@ export declare const MODELS: {
|
|
|
8717
8768
|
contextWindow: number;
|
|
8718
8769
|
maxTokens: number;
|
|
8719
8770
|
};
|
|
8771
|
+
readonly "openai/gpt-5.3-codex": {
|
|
8772
|
+
id: string;
|
|
8773
|
+
name: string;
|
|
8774
|
+
api: "openai-completions";
|
|
8775
|
+
provider: string;
|
|
8776
|
+
baseUrl: string;
|
|
8777
|
+
reasoning: true;
|
|
8778
|
+
input: ("image" | "text")[];
|
|
8779
|
+
cost: {
|
|
8780
|
+
input: number;
|
|
8781
|
+
output: number;
|
|
8782
|
+
cacheRead: number;
|
|
8783
|
+
cacheWrite: number;
|
|
8784
|
+
};
|
|
8785
|
+
contextWindow: number;
|
|
8786
|
+
maxTokens: number;
|
|
8787
|
+
};
|
|
8720
8788
|
readonly "openai/gpt-oss-120b": {
|
|
8721
8789
|
id: string;
|
|
8722
8790
|
name: string;
|
|
@@ -9652,6 +9720,57 @@ export declare const MODELS: {
|
|
|
9652
9720
|
contextWindow: number;
|
|
9653
9721
|
maxTokens: number;
|
|
9654
9722
|
};
|
|
9723
|
+
readonly "qwen/qwen3.5-122b-a10b": {
|
|
9724
|
+
id: string;
|
|
9725
|
+
name: string;
|
|
9726
|
+
api: "openai-completions";
|
|
9727
|
+
provider: string;
|
|
9728
|
+
baseUrl: string;
|
|
9729
|
+
reasoning: true;
|
|
9730
|
+
input: ("image" | "text")[];
|
|
9731
|
+
cost: {
|
|
9732
|
+
input: number;
|
|
9733
|
+
output: number;
|
|
9734
|
+
cacheRead: number;
|
|
9735
|
+
cacheWrite: number;
|
|
9736
|
+
};
|
|
9737
|
+
contextWindow: number;
|
|
9738
|
+
maxTokens: number;
|
|
9739
|
+
};
|
|
9740
|
+
readonly "qwen/qwen3.5-27b": {
|
|
9741
|
+
id: string;
|
|
9742
|
+
name: string;
|
|
9743
|
+
api: "openai-completions";
|
|
9744
|
+
provider: string;
|
|
9745
|
+
baseUrl: string;
|
|
9746
|
+
reasoning: true;
|
|
9747
|
+
input: ("image" | "text")[];
|
|
9748
|
+
cost: {
|
|
9749
|
+
input: number;
|
|
9750
|
+
output: number;
|
|
9751
|
+
cacheRead: number;
|
|
9752
|
+
cacheWrite: number;
|
|
9753
|
+
};
|
|
9754
|
+
contextWindow: number;
|
|
9755
|
+
maxTokens: number;
|
|
9756
|
+
};
|
|
9757
|
+
readonly "qwen/qwen3.5-35b-a3b": {
|
|
9758
|
+
id: string;
|
|
9759
|
+
name: string;
|
|
9760
|
+
api: "openai-completions";
|
|
9761
|
+
provider: string;
|
|
9762
|
+
baseUrl: string;
|
|
9763
|
+
reasoning: true;
|
|
9764
|
+
input: ("image" | "text")[];
|
|
9765
|
+
cost: {
|
|
9766
|
+
input: number;
|
|
9767
|
+
output: number;
|
|
9768
|
+
cacheRead: number;
|
|
9769
|
+
cacheWrite: number;
|
|
9770
|
+
};
|
|
9771
|
+
contextWindow: number;
|
|
9772
|
+
maxTokens: number;
|
|
9773
|
+
};
|
|
9655
9774
|
readonly "qwen/qwen3.5-397b-a17b": {
|
|
9656
9775
|
id: string;
|
|
9657
9776
|
name: string;
|
|
@@ -9669,6 +9788,23 @@ export declare const MODELS: {
|
|
|
9669
9788
|
contextWindow: number;
|
|
9670
9789
|
maxTokens: number;
|
|
9671
9790
|
};
|
|
9791
|
+
readonly "qwen/qwen3.5-flash-02-23": {
|
|
9792
|
+
id: string;
|
|
9793
|
+
name: string;
|
|
9794
|
+
api: "openai-completions";
|
|
9795
|
+
provider: string;
|
|
9796
|
+
baseUrl: string;
|
|
9797
|
+
reasoning: true;
|
|
9798
|
+
input: ("image" | "text")[];
|
|
9799
|
+
cost: {
|
|
9800
|
+
input: number;
|
|
9801
|
+
output: number;
|
|
9802
|
+
cacheRead: number;
|
|
9803
|
+
cacheWrite: number;
|
|
9804
|
+
};
|
|
9805
|
+
contextWindow: number;
|
|
9806
|
+
maxTokens: number;
|
|
9807
|
+
};
|
|
9672
9808
|
readonly "qwen/qwen3.5-plus-02-15": {
|
|
9673
9809
|
id: string;
|
|
9674
9810
|
name: string;
|
|
@@ -10402,6 +10538,23 @@ export declare const MODELS: {
|
|
|
10402
10538
|
contextWindow: number;
|
|
10403
10539
|
maxTokens: number;
|
|
10404
10540
|
};
|
|
10541
|
+
readonly "alibaba/qwen3.5-flash": {
|
|
10542
|
+
id: string;
|
|
10543
|
+
name: string;
|
|
10544
|
+
api: "anthropic-messages";
|
|
10545
|
+
provider: string;
|
|
10546
|
+
baseUrl: string;
|
|
10547
|
+
reasoning: true;
|
|
10548
|
+
input: ("image" | "text")[];
|
|
10549
|
+
cost: {
|
|
10550
|
+
input: number;
|
|
10551
|
+
output: number;
|
|
10552
|
+
cacheRead: number;
|
|
10553
|
+
cacheWrite: number;
|
|
10554
|
+
};
|
|
10555
|
+
contextWindow: number;
|
|
10556
|
+
maxTokens: number;
|
|
10557
|
+
};
|
|
10405
10558
|
readonly "alibaba/qwen3.5-plus": {
|
|
10406
10559
|
id: string;
|
|
10407
10560
|
name: string;
|
|
@@ -11813,6 +11966,23 @@ export declare const MODELS: {
|
|
|
11813
11966
|
contextWindow: number;
|
|
11814
11967
|
maxTokens: number;
|
|
11815
11968
|
};
|
|
11969
|
+
readonly "openai/gpt-5.3-codex": {
|
|
11970
|
+
id: string;
|
|
11971
|
+
name: string;
|
|
11972
|
+
api: "anthropic-messages";
|
|
11973
|
+
provider: string;
|
|
11974
|
+
baseUrl: string;
|
|
11975
|
+
reasoning: true;
|
|
11976
|
+
input: ("image" | "text")[];
|
|
11977
|
+
cost: {
|
|
11978
|
+
input: number;
|
|
11979
|
+
output: number;
|
|
11980
|
+
cacheRead: number;
|
|
11981
|
+
cacheWrite: number;
|
|
11982
|
+
};
|
|
11983
|
+
contextWindow: number;
|
|
11984
|
+
maxTokens: number;
|
|
11985
|
+
};
|
|
11816
11986
|
readonly "openai/gpt-oss-120b": {
|
|
11817
11987
|
id: string;
|
|
11818
11988
|
name: string;
|