@mariozechner/pi-ai 0.55.0 → 0.55.2
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 +136 -0
- package/dist/models.generated.d.ts.map +1 -1
- package/dist/models.generated.js +149 -13
- 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 +41 -14
- package/dist/providers/anthropic.js.map +1 -1
- package/dist/providers/openai-completions.d.ts.map +1 -1
- package/dist/providers/openai-completions.js +3 -8
- package/dist/providers/openai-completions.js.map +1 -1
- package/dist/providers/transform-messages.d.ts.map +1 -1
- package/dist/providers/transform-messages.js +5 -0
- package/dist/providers/transform-messages.js.map +1 -1
- package/dist/types.d.ts +4 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/utils/oauth/index.d.ts +11 -0
- package/dist/utils/oauth/index.d.ts.map +1 -1
- package/dist/utils/oauth/index.js +31 -7
- package/dist/utils/oauth/index.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,I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et _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": {
|
|
@@ -6847,6 +6864,23 @@ export declare const MODELS: {
|
|
|
6847
6864
|
contextWindow: number;
|
|
6848
6865
|
maxTokens: number;
|
|
6849
6866
|
};
|
|
6867
|
+
readonly "bytedance-seed/seed-2.0-mini": {
|
|
6868
|
+
id: string;
|
|
6869
|
+
name: string;
|
|
6870
|
+
api: "openai-completions";
|
|
6871
|
+
provider: string;
|
|
6872
|
+
baseUrl: string;
|
|
6873
|
+
reasoning: true;
|
|
6874
|
+
input: ("image" | "text")[];
|
|
6875
|
+
cost: {
|
|
6876
|
+
input: number;
|
|
6877
|
+
output: number;
|
|
6878
|
+
cacheRead: number;
|
|
6879
|
+
cacheWrite: number;
|
|
6880
|
+
};
|
|
6881
|
+
contextWindow: number;
|
|
6882
|
+
maxTokens: number;
|
|
6883
|
+
};
|
|
6850
6884
|
readonly "cohere/command-r-08-2024": {
|
|
6851
6885
|
id: string;
|
|
6852
6886
|
name: string;
|
|
@@ -7221,6 +7255,23 @@ export declare const MODELS: {
|
|
|
7221
7255
|
contextWindow: number;
|
|
7222
7256
|
maxTokens: number;
|
|
7223
7257
|
};
|
|
7258
|
+
readonly "google/gemini-3.1-pro-preview-customtools": {
|
|
7259
|
+
id: string;
|
|
7260
|
+
name: string;
|
|
7261
|
+
api: "openai-completions";
|
|
7262
|
+
provider: string;
|
|
7263
|
+
baseUrl: string;
|
|
7264
|
+
reasoning: true;
|
|
7265
|
+
input: ("image" | "text")[];
|
|
7266
|
+
cost: {
|
|
7267
|
+
input: number;
|
|
7268
|
+
output: number;
|
|
7269
|
+
cacheRead: number;
|
|
7270
|
+
cacheWrite: number;
|
|
7271
|
+
};
|
|
7272
|
+
contextWindow: number;
|
|
7273
|
+
maxTokens: number;
|
|
7274
|
+
};
|
|
7224
7275
|
readonly "google/gemma-3-27b-it": {
|
|
7225
7276
|
id: string;
|
|
7226
7277
|
name: string;
|
|
@@ -7306,6 +7357,23 @@ export declare const MODELS: {
|
|
|
7306
7357
|
contextWindow: number;
|
|
7307
7358
|
maxTokens: number;
|
|
7308
7359
|
};
|
|
7360
|
+
readonly "meituan/longcat-flash-chat": {
|
|
7361
|
+
id: string;
|
|
7362
|
+
name: string;
|
|
7363
|
+
api: "openai-completions";
|
|
7364
|
+
provider: string;
|
|
7365
|
+
baseUrl: string;
|
|
7366
|
+
reasoning: false;
|
|
7367
|
+
input: "text"[];
|
|
7368
|
+
cost: {
|
|
7369
|
+
input: number;
|
|
7370
|
+
output: number;
|
|
7371
|
+
cacheRead: number;
|
|
7372
|
+
cacheWrite: number;
|
|
7373
|
+
};
|
|
7374
|
+
contextWindow: number;
|
|
7375
|
+
maxTokens: number;
|
|
7376
|
+
};
|
|
7309
7377
|
readonly "meta-llama/llama-3-8b-instruct": {
|
|
7310
7378
|
id: string;
|
|
7311
7379
|
name: string;
|
|
@@ -9669,6 +9737,57 @@ export declare const MODELS: {
|
|
|
9669
9737
|
contextWindow: number;
|
|
9670
9738
|
maxTokens: number;
|
|
9671
9739
|
};
|
|
9740
|
+
readonly "qwen/qwen3.5-122b-a10b": {
|
|
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-27b": {
|
|
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
|
+
};
|
|
9774
|
+
readonly "qwen/qwen3.5-35b-a3b": {
|
|
9775
|
+
id: string;
|
|
9776
|
+
name: string;
|
|
9777
|
+
api: "openai-completions";
|
|
9778
|
+
provider: string;
|
|
9779
|
+
baseUrl: string;
|
|
9780
|
+
reasoning: true;
|
|
9781
|
+
input: ("image" | "text")[];
|
|
9782
|
+
cost: {
|
|
9783
|
+
input: number;
|
|
9784
|
+
output: number;
|
|
9785
|
+
cacheRead: number;
|
|
9786
|
+
cacheWrite: number;
|
|
9787
|
+
};
|
|
9788
|
+
contextWindow: number;
|
|
9789
|
+
maxTokens: number;
|
|
9790
|
+
};
|
|
9672
9791
|
readonly "qwen/qwen3.5-397b-a17b": {
|
|
9673
9792
|
id: string;
|
|
9674
9793
|
name: string;
|
|
@@ -9686,6 +9805,23 @@ export declare const MODELS: {
|
|
|
9686
9805
|
contextWindow: number;
|
|
9687
9806
|
maxTokens: number;
|
|
9688
9807
|
};
|
|
9808
|
+
readonly "qwen/qwen3.5-flash-02-23": {
|
|
9809
|
+
id: string;
|
|
9810
|
+
name: string;
|
|
9811
|
+
api: "openai-completions";
|
|
9812
|
+
provider: string;
|
|
9813
|
+
baseUrl: string;
|
|
9814
|
+
reasoning: true;
|
|
9815
|
+
input: ("image" | "text")[];
|
|
9816
|
+
cost: {
|
|
9817
|
+
input: number;
|
|
9818
|
+
output: number;
|
|
9819
|
+
cacheRead: number;
|
|
9820
|
+
cacheWrite: number;
|
|
9821
|
+
};
|
|
9822
|
+
contextWindow: number;
|
|
9823
|
+
maxTokens: number;
|
|
9824
|
+
};
|
|
9689
9825
|
readonly "qwen/qwen3.5-plus-02-15": {
|
|
9690
9826
|
id: string;
|
|
9691
9827
|
name: string;
|