@mariozechner/pi-ai 0.55.4 → 0.56.0
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 +16 -4
- package/bedrock-provider.d.ts +1 -0
- package/bedrock-provider.js +1 -0
- package/dist/bedrock-provider.d.ts +5 -0
- package/dist/bedrock-provider.d.ts.map +1 -0
- package/dist/bedrock-provider.js +6 -0
- package/dist/bedrock-provider.js.map +1 -0
- package/dist/env-api-keys.d.ts.map +1 -1
- package/dist/env-api-keys.js +8 -3
- package/dist/env-api-keys.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/dist/models.generated.d.ts +158 -3
- package/dist/models.generated.d.ts.map +1 -1
- package/dist/models.generated.js +205 -50
- package/dist/models.generated.js.map +1 -1
- package/dist/oauth.d.ts +2 -0
- package/dist/oauth.d.ts.map +1 -0
- package/dist/oauth.js +2 -0
- package/dist/oauth.js.map +1 -0
- package/dist/providers/amazon-bedrock.d.ts.map +1 -1
- package/dist/providers/amazon-bedrock.js +15 -3
- package/dist/providers/amazon-bedrock.js.map +1 -1
- package/dist/providers/google-gemini-cli.d.ts.map +1 -1
- package/dist/providers/google-gemini-cli.js +12 -3
- package/dist/providers/google-gemini-cli.js.map +1 -1
- package/dist/providers/google-vertex.d.ts.map +1 -1
- package/dist/providers/google-vertex.js +2 -2
- package/dist/providers/google-vertex.js.map +1 -1
- package/dist/providers/google.d.ts.map +1 -1
- package/dist/providers/google.js +2 -2
- package/dist/providers/google.js.map +1 -1
- package/dist/providers/openai-codex-responses.d.ts.map +1 -1
- package/dist/providers/openai-codex-responses.js +4 -2
- 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 +16 -1
- package/dist/providers/openai-completions.js.map +1 -1
- package/dist/providers/register-builtins.d.ts +7 -0
- package/dist/providers/register-builtins.d.ts.map +1 -1
- package/dist/providers/register-builtins.js +72 -3
- package/dist/providers/register-builtins.js.map +1 -1
- package/dist/stream.d.ts +0 -1
- package/dist/stream.d.ts.map +1 -1
- package/dist/stream.js +0 -1
- package/dist/stream.js.map +1 -1
- package/dist/types.d.ts +3 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/utils/oauth/index.d.ts +0 -1
- package/dist/utils/oauth/index.d.ts.map +1 -1
- package/dist/utils/oauth/index.js +0 -2
- package/dist/utils/oauth/index.js.map +1 -1
- package/oauth.d.ts +1 -0
- package/oauth.js +1 -0
- package/package.json +20 -2
- package/dist/utils/http-proxy.d.ts +0 -2
- package/dist/utils/http-proxy.d.ts.map +0 -1
- package/dist/utils/http-proxy.js +0 -15
- package/dist/utils/http-proxy.js.map +0 -1
package/README.md
CHANGED
|
@@ -33,6 +33,7 @@ Unified LLM API with automatic model discovery, provider configuration, token an
|
|
|
33
33
|
- [Cross-Provider Handoffs](#cross-provider-handoffs)
|
|
34
34
|
- [Context Serialization](#context-serialization)
|
|
35
35
|
- [Browser Usage](#browser-usage)
|
|
36
|
+
- [Browser Compatibility Notes](#browser-compatibility-notes)
|
|
36
37
|
- [Environment Variables](#environment-variables-nodejs-only)
|
|
37
38
|
- [Checking Environment Variables](#checking-environment-variables)
|
|
38
39
|
- [OAuth Providers](#oauth-providers)
|
|
@@ -63,6 +64,8 @@ Unified LLM API with automatic model discovery, provider configuration, token an
|
|
|
63
64
|
- **Google Gemini CLI** (requires OAuth, see below)
|
|
64
65
|
- **Antigravity** (requires OAuth, see below)
|
|
65
66
|
- **Amazon Bedrock**
|
|
67
|
+
- **OpenCode Zen**
|
|
68
|
+
- **OpenCode Go**
|
|
66
69
|
- **Kimi For Coding** (Moonshot AI, uses Anthropic-compatible API)
|
|
67
70
|
- **Any OpenAI-compatible API**: Ollama, vLLM, LM Studio, etc.
|
|
68
71
|
|
|
@@ -886,6 +889,13 @@ const response = await complete(model, {
|
|
|
886
889
|
|
|
887
890
|
> **Security Warning**: Exposing API keys in frontend code is dangerous. Anyone can extract and abuse your keys. Only use this approach for internal tools or demos. For production applications, use a backend proxy that keeps your API keys secure.
|
|
888
891
|
|
|
892
|
+
### Browser Compatibility Notes
|
|
893
|
+
|
|
894
|
+
- Amazon Bedrock (`bedrock-converse-stream`) is not supported in browser environments.
|
|
895
|
+
- OAuth login flows are not supported in browser environments. Use the `@mariozechner/pi-ai/oauth` entry point in Node.js.
|
|
896
|
+
- In browser builds, Bedrock can still appear in model lists. Calls to Bedrock models fail at runtime.
|
|
897
|
+
- Use a server-side proxy or backend service if you need Bedrock or OAuth-based auth from a web app.
|
|
898
|
+
|
|
889
899
|
### Environment Variables (Node.js only)
|
|
890
900
|
|
|
891
901
|
In Node.js environments, you can set environment variables to avoid passing API keys:
|
|
@@ -905,6 +915,7 @@ In Node.js environments, you can set environment variables to avoid passing API
|
|
|
905
915
|
| Vercel AI Gateway | `AI_GATEWAY_API_KEY` |
|
|
906
916
|
| zAI | `ZAI_API_KEY` |
|
|
907
917
|
| MiniMax | `MINIMAX_API_KEY` |
|
|
918
|
+
| OpenCode Zen / OpenCode Go | `OPENCODE_API_KEY` |
|
|
908
919
|
| Kimi For Coding | `KIMI_API_KEY` |
|
|
909
920
|
| GitHub Copilot | `COPILOT_GITHUB_TOKEN` or `GH_TOKEN` or `GITHUB_TOKEN` |
|
|
910
921
|
|
|
@@ -1015,7 +1026,7 @@ Credentials are saved to `auth.json` in the current directory.
|
|
|
1015
1026
|
|
|
1016
1027
|
### Programmatic OAuth
|
|
1017
1028
|
|
|
1018
|
-
The library provides login and token refresh functions. Credential storage is the caller's responsibility.
|
|
1029
|
+
The library provides login and token refresh functions via the `@mariozechner/pi-ai/oauth` entry point. Credential storage is the caller's responsibility.
|
|
1019
1030
|
|
|
1020
1031
|
```typescript
|
|
1021
1032
|
import {
|
|
@@ -1033,13 +1044,13 @@ import {
|
|
|
1033
1044
|
// Types
|
|
1034
1045
|
type OAuthProvider, // 'anthropic' | 'openai-codex' | 'github-copilot' | 'google-gemini-cli' | 'google-antigravity'
|
|
1035
1046
|
type OAuthCredentials,
|
|
1036
|
-
} from '@mariozechner/pi-ai';
|
|
1047
|
+
} from '@mariozechner/pi-ai/oauth';
|
|
1037
1048
|
```
|
|
1038
1049
|
|
|
1039
1050
|
### Login Flow Example
|
|
1040
1051
|
|
|
1041
1052
|
```typescript
|
|
1042
|
-
import { loginGitHubCopilot } from '@mariozechner/pi-ai';
|
|
1053
|
+
import { loginGitHubCopilot } from '@mariozechner/pi-ai/oauth';
|
|
1043
1054
|
import { writeFileSync } from 'fs';
|
|
1044
1055
|
|
|
1045
1056
|
const credentials = await loginGitHubCopilot({
|
|
@@ -1063,7 +1074,8 @@ writeFileSync('auth.json', JSON.stringify(auth, null, 2));
|
|
|
1063
1074
|
Use `getOAuthApiKey()` to get an API key, automatically refreshing if expired:
|
|
1064
1075
|
|
|
1065
1076
|
```typescript
|
|
1066
|
-
import { getModel, complete
|
|
1077
|
+
import { getModel, complete } from '@mariozechner/pi-ai';
|
|
1078
|
+
import { getOAuthApiKey } from '@mariozechner/pi-ai/oauth';
|
|
1067
1079
|
import { readFileSync, writeFileSync } from 'fs';
|
|
1068
1080
|
|
|
1069
1081
|
// Load your stored credentials
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./dist/bedrock-provider.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./dist/bedrock-provider.js";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const bedrockProviderModule: {
|
|
2
|
+
streamBedrock: import("./types.js").StreamFunction<"bedrock-converse-stream", import("./providers/amazon-bedrock.js").BedrockOptions>;
|
|
3
|
+
streamSimpleBedrock: import("./types.js").StreamFunction<"bedrock-converse-stream", import("./types.js").SimpleStreamOptions>;
|
|
4
|
+
};
|
|
5
|
+
//# sourceMappingURL=bedrock-provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bedrock-provider.d.ts","sourceRoot":"","sources":["../src/bedrock-provider.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,qBAAqB;;;CAGjC,CAAC","sourcesContent":["import { streamBedrock, streamSimpleBedrock } from \"./providers/amazon-bedrock.js\";\n\nexport const bedrockProviderModule = {\n\tstreamBedrock,\n\tstreamSimpleBedrock,\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bedrock-provider.js","sourceRoot":"","sources":["../src/bedrock-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAEnF,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACpC,aAAa;IACb,mBAAmB;CACnB,CAAC","sourcesContent":["import { streamBedrock, streamSimpleBedrock } from \"./providers/amazon-bedrock.js\";\n\nexport const bedrockProviderModule = {\n\tstreamBedrock,\n\tstreamSimpleBedrock,\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env-api-keys.d.ts","sourceRoot":"","sources":["../src/env-api-keys.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"env-api-keys.d.ts","sourceRoot":"","sources":["../src/env-api-keys.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAgChD;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,aAAa,GAAG,MAAM,GAAG,SAAS,CAAC;AAC1E,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC","sourcesContent":["// NEVER convert to top-level imports - breaks browser/Vite builds (web-ui)\nlet _existsSync: typeof import(\"node:fs\").existsSync | null = null;\nlet _homedir: typeof import(\"node:os\").homedir | null = null;\nlet _join: typeof import(\"node:path\").join | null = null;\n\ntype DynamicImport = (specifier: string) => Promise<unknown>;\n\nconst dynamicImport: DynamicImport = (specifier) => import(specifier);\nconst NODE_FS_SPECIFIER = \"node:\" + \"fs\";\nconst NODE_OS_SPECIFIER = \"node:\" + \"os\";\nconst NODE_PATH_SPECIFIER = \"node:\" + \"path\";\n\n// Eagerly load in Node.js/Bun environment only\nif (typeof process !== \"undefined\" && (process.versions?.node || process.versions?.bun)) {\n\tdynamicImport(NODE_FS_SPECIFIER).then((m) => {\n\t\t_existsSync = (m as typeof import(\"node:fs\")).existsSync;\n\t});\n\tdynamicImport(NODE_OS_SPECIFIER).then((m) => {\n\t\t_homedir = (m as typeof import(\"node:os\")).homedir;\n\t});\n\tdynamicImport(NODE_PATH_SPECIFIER).then((m) => {\n\t\t_join = (m as typeof import(\"node:path\")).join;\n\t});\n}\n\nimport type { KnownProvider } from \"./types.js\";\n\nlet cachedVertexAdcCredentialsExists: boolean | null = null;\n\nfunction hasVertexAdcCredentials(): boolean {\n\tif (cachedVertexAdcCredentialsExists === null) {\n\t\t// If node modules haven't loaded yet (async import race at startup),\n\t\t// return false WITHOUT caching so the next call retries once they're ready.\n\t\t// Only cache false permanently in a browser environment where fs is never available.\n\t\tif (!_existsSync || !_homedir || !_join) {\n\t\t\tconst isNode = typeof process !== \"undefined\" && (process.versions?.node || process.versions?.bun);\n\t\t\tif (!isNode) {\n\t\t\t\t// Definitively in a browser — safe to cache false permanently\n\t\t\t\tcachedVertexAdcCredentialsExists = false;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\n\t\t// Check GOOGLE_APPLICATION_CREDENTIALS env var first (standard way)\n\t\tconst gacPath = process.env.GOOGLE_APPLICATION_CREDENTIALS;\n\t\tif (gacPath) {\n\t\t\tcachedVertexAdcCredentialsExists = _existsSync(gacPath);\n\t\t} else {\n\t\t\t// Fall back to default ADC path (lazy evaluation)\n\t\t\tcachedVertexAdcCredentialsExists = _existsSync(\n\t\t\t\t_join(_homedir(), \".config\", \"gcloud\", \"application_default_credentials.json\"),\n\t\t\t);\n\t\t}\n\t}\n\treturn cachedVertexAdcCredentialsExists;\n}\n\n/**\n * Get API key for provider from known environment variables, e.g. OPENAI_API_KEY.\n *\n * Will not return API keys for providers that require OAuth tokens.\n */\nexport function getEnvApiKey(provider: KnownProvider): string | undefined;\nexport function getEnvApiKey(provider: string): string | undefined;\nexport function getEnvApiKey(provider: any): string | undefined {\n\t// Fall back to environment variables\n\tif (provider === \"github-copilot\") {\n\t\treturn process.env.COPILOT_GITHUB_TOKEN || process.env.GH_TOKEN || process.env.GITHUB_TOKEN;\n\t}\n\n\t// ANTHROPIC_OAUTH_TOKEN takes precedence over ANTHROPIC_API_KEY\n\tif (provider === \"anthropic\") {\n\t\treturn process.env.ANTHROPIC_OAUTH_TOKEN || process.env.ANTHROPIC_API_KEY;\n\t}\n\n\t// Vertex AI 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\"opencode-go\": \"OPENCODE_API_KEY\",\n\t\t\"kimi-coding\": \"KIMI_API_KEY\",\n\t};\n\n\tconst envVar = envMap[provider];\n\treturn envVar ? process.env[envVar] : undefined;\n}\n"]}
|
package/dist/env-api-keys.js
CHANGED
|
@@ -2,15 +2,19 @@
|
|
|
2
2
|
let _existsSync = null;
|
|
3
3
|
let _homedir = null;
|
|
4
4
|
let _join = null;
|
|
5
|
+
const dynamicImport = (specifier) => import(specifier);
|
|
6
|
+
const NODE_FS_SPECIFIER = "node:" + "fs";
|
|
7
|
+
const NODE_OS_SPECIFIER = "node:" + "os";
|
|
8
|
+
const NODE_PATH_SPECIFIER = "node:" + "path";
|
|
5
9
|
// Eagerly load in Node.js/Bun environment only
|
|
6
10
|
if (typeof process !== "undefined" && (process.versions?.node || process.versions?.bun)) {
|
|
7
|
-
|
|
11
|
+
dynamicImport(NODE_FS_SPECIFIER).then((m) => {
|
|
8
12
|
_existsSync = m.existsSync;
|
|
9
13
|
});
|
|
10
|
-
|
|
14
|
+
dynamicImport(NODE_OS_SPECIFIER).then((m) => {
|
|
11
15
|
_homedir = m.homedir;
|
|
12
16
|
});
|
|
13
|
-
|
|
17
|
+
dynamicImport(NODE_PATH_SPECIFIER).then((m) => {
|
|
14
18
|
_join = m.join;
|
|
15
19
|
});
|
|
16
20
|
}
|
|
@@ -91,6 +95,7 @@ export function getEnvApiKey(provider) {
|
|
|
91
95
|
"minimax-cn": "MINIMAX_CN_API_KEY",
|
|
92
96
|
huggingface: "HF_TOKEN",
|
|
93
97
|
opencode: "OPENCODE_API_KEY",
|
|
98
|
+
"opencode-go": "OPENCODE_API_KEY",
|
|
94
99
|
"kimi-coding": "KIMI_API_KEY",
|
|
95
100
|
};
|
|
96
101
|
const envVar = envMap[provider];
|
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;
|
|
1
|
+
{"version":3,"file":"env-api-keys.js","sourceRoot":"","sources":["../src/env-api-keys.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,IAAI,WAAW,GAA+C,IAAI,CAAC;AACnE,IAAI,QAAQ,GAA4C,IAAI,CAAC;AAC7D,IAAI,KAAK,GAA2C,IAAI,CAAC;AAIzD,MAAM,aAAa,GAAkB,CAAC,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;AACtE,MAAM,iBAAiB,GAAG,OAAO,GAAG,IAAI,CAAC;AACzC,MAAM,iBAAiB,GAAG,OAAO,GAAG,IAAI,CAAC;AACzC,MAAM,mBAAmB,GAAG,OAAO,GAAG,MAAM,CAAC;AAE7C,+CAA+C;AAC/C,IAAI,OAAO,OAAO,KAAK,WAAW,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,IAAI,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC,EAAE,CAAC;IACzF,aAAa,CAAC,iBAAiB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;QAC5C,WAAW,GAAI,CAA8B,CAAC,UAAU,CAAC;IAAA,CACzD,CAAC,CAAC;IACH,aAAa,CAAC,iBAAiB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;QAC5C,QAAQ,GAAI,CAA8B,CAAC,OAAO,CAAC;IAAA,CACnD,CAAC,CAAC;IACH,aAAa,CAAC,mBAAmB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;QAC9C,KAAK,GAAI,CAAgC,CAAC,IAAI,CAAC;IAAA,CAC/C,CAAC,CAAC;AACJ,CAAC;AAID,IAAI,gCAAgC,GAAmB,IAAI,CAAC;AAE5D,SAAS,uBAAuB,GAAY;IAC3C,IAAI,gCAAgC,KAAK,IAAI,EAAE,CAAC;QAC/C,qEAAqE;QACrE,4EAA4E;QAC5E,qFAAqF;QACrF,IAAI,CAAC,WAAW,IAAI,CAAC,QAAQ,IAAI,CAAC,KAAK,EAAE,CAAC;YACzC,MAAM,MAAM,GAAG,OAAO,OAAO,KAAK,WAAW,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,IAAI,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;YACnG,IAAI,CAAC,MAAM,EAAE,CAAC;gBACb,gEAA8D;gBAC9D,gCAAgC,GAAG,KAAK,CAAC;YAC1C,CAAC;YACD,OAAO,KAAK,CAAC;QACd,CAAC;QAED,oEAAoE;QACpE,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC;QAC3D,IAAI,OAAO,EAAE,CAAC;YACb,gCAAgC,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;QACzD,CAAC;aAAM,CAAC;YACP,kDAAkD;YAClD,gCAAgC,GAAG,WAAW,CAC7C,KAAK,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,sCAAsC,CAAC,CAC9E,CAAC;QACH,CAAC;IACF,CAAC;IACD,OAAO,gCAAgC,CAAC;AAAA,CACxC;AASD,MAAM,UAAU,YAAY,CAAC,QAAa,EAAsB;IAC/D,qCAAqC;IACrC,IAAI,QAAQ,KAAK,gBAAgB,EAAE,CAAC;QACnC,OAAO,OAAO,CAAC,GAAG,CAAC,oBAAoB,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC;IAC7F,CAAC;IAED,gEAAgE;IAChE,IAAI,QAAQ,KAAK,WAAW,EAAE,CAAC;QAC9B,OAAO,OAAO,CAAC,GAAG,CAAC,qBAAqB,IAAI,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC;IAC3E,CAAC;IAED,gEAAgE;IAChE,kEAAkE;IAClE,IAAI,QAAQ,KAAK,eAAe,EAAE,CAAC;QAClC,MAAM,cAAc,GAAG,uBAAuB,EAAE,CAAC;QACjD,MAAM,UAAU,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,oBAAoB,IAAI,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;QACtF,MAAM,WAAW,GAAG,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC;QAExD,IAAI,cAAc,IAAI,UAAU,IAAI,WAAW,EAAE,CAAC;YACjD,OAAO,iBAAiB,CAAC;QAC1B,CAAC;IACF,CAAC;IAED,IAAI,QAAQ,KAAK,gBAAgB,EAAE,CAAC;QACnC,uDAAuD;QACvD,yDAAyD;QACzD,mEAAmE;QACnE,gEAAgE;QAChE,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,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,kBAAkB;QACjC,aAAa,EAAE,cAAc;KAC7B,CAAC;IAEF,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;IAChC,OAAO,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAAA,CAChD","sourcesContent":["// NEVER convert to top-level imports - breaks browser/Vite builds (web-ui)\nlet _existsSync: typeof import(\"node:fs\").existsSync | null = null;\nlet _homedir: typeof import(\"node:os\").homedir | null = null;\nlet _join: typeof import(\"node:path\").join | null = null;\n\ntype DynamicImport = (specifier: string) => Promise<unknown>;\n\nconst dynamicImport: DynamicImport = (specifier) => import(specifier);\nconst NODE_FS_SPECIFIER = \"node:\" + \"fs\";\nconst NODE_OS_SPECIFIER = \"node:\" + \"os\";\nconst NODE_PATH_SPECIFIER = \"node:\" + \"path\";\n\n// Eagerly load in Node.js/Bun environment only\nif (typeof process !== \"undefined\" && (process.versions?.node || process.versions?.bun)) {\n\tdynamicImport(NODE_FS_SPECIFIER).then((m) => {\n\t\t_existsSync = (m as typeof import(\"node:fs\")).existsSync;\n\t});\n\tdynamicImport(NODE_OS_SPECIFIER).then((m) => {\n\t\t_homedir = (m as typeof import(\"node:os\")).homedir;\n\t});\n\tdynamicImport(NODE_PATH_SPECIFIER).then((m) => {\n\t\t_join = (m as typeof import(\"node:path\")).join;\n\t});\n}\n\nimport type { KnownProvider } from \"./types.js\";\n\nlet cachedVertexAdcCredentialsExists: boolean | null = null;\n\nfunction hasVertexAdcCredentials(): boolean {\n\tif (cachedVertexAdcCredentialsExists === null) {\n\t\t// If node modules haven't loaded yet (async import race at startup),\n\t\t// return false WITHOUT caching so the next call retries once they're ready.\n\t\t// Only cache false permanently in a browser environment where fs is never available.\n\t\tif (!_existsSync || !_homedir || !_join) {\n\t\t\tconst isNode = typeof process !== \"undefined\" && (process.versions?.node || process.versions?.bun);\n\t\t\tif (!isNode) {\n\t\t\t\t// Definitively in a browser — safe to cache false permanently\n\t\t\t\tcachedVertexAdcCredentialsExists = false;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\n\t\t// Check GOOGLE_APPLICATION_CREDENTIALS env var first (standard way)\n\t\tconst gacPath = process.env.GOOGLE_APPLICATION_CREDENTIALS;\n\t\tif (gacPath) {\n\t\t\tcachedVertexAdcCredentialsExists = _existsSync(gacPath);\n\t\t} else {\n\t\t\t// Fall back to default ADC path (lazy evaluation)\n\t\t\tcachedVertexAdcCredentialsExists = _existsSync(\n\t\t\t\t_join(_homedir(), \".config\", \"gcloud\", \"application_default_credentials.json\"),\n\t\t\t);\n\t\t}\n\t}\n\treturn cachedVertexAdcCredentialsExists;\n}\n\n/**\n * Get API key for provider from known environment variables, e.g. OPENAI_API_KEY.\n *\n * Will not return API keys for providers that require OAuth tokens.\n */\nexport function getEnvApiKey(provider: KnownProvider): string | undefined;\nexport function getEnvApiKey(provider: string): string | undefined;\nexport function getEnvApiKey(provider: any): string | undefined {\n\t// Fall back to environment variables\n\tif (provider === \"github-copilot\") {\n\t\treturn process.env.COPILOT_GITHUB_TOKEN || process.env.GH_TOKEN || process.env.GITHUB_TOKEN;\n\t}\n\n\t// ANTHROPIC_OAUTH_TOKEN takes precedence over ANTHROPIC_API_KEY\n\tif (provider === \"anthropic\") {\n\t\treturn process.env.ANTHROPIC_OAUTH_TOKEN || process.env.ANTHROPIC_API_KEY;\n\t}\n\n\t// Vertex AI 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\"opencode-go\": \"OPENCODE_API_KEY\",\n\t\t\"kimi-coding\": \"KIMI_API_KEY\",\n\t};\n\n\tconst envVar = envMap[provider];\n\treturn envVar ? process.env[envVar] : undefined;\n}\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export * from "./stream.js";
|
|
|
15
15
|
export * from "./types.js";
|
|
16
16
|
export * from "./utils/event-stream.js";
|
|
17
17
|
export * from "./utils/json-parse.js";
|
|
18
|
-
export
|
|
18
|
+
export type { OAuthAuthInfo, OAuthCredentials, OAuthLoginCallbacks, OAuthPrompt, OAuthProvider, OAuthProviderId, OAuthProviderInfo, OAuthProviderInterface, } from "./utils/oauth/types.js";
|
|
19
19
|
export * from "./utils/overflow.js";
|
|
20
20
|
export * from "./utils/typebox-helpers.js";
|
|
21
21
|
export * from "./utils/validation.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,0BAA0B,CAAC;AACzC,cAAc,uCAAuC,CAAC;AACtD,cAAc,uBAAuB,CAAC;AACtC,cAAc,kCAAkC,CAAC;AACjD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mCAAmC,CAAC;AAClD,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC;AACjD,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,0BAA0B,CAAC;AACzC,cAAc,uCAAuC,CAAC;AACtD,cAAc,uBAAuB,CAAC;AACtC,cAAc,kCAAkC,CAAC;AACjD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mCAAmC,CAAC;AAClD,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC;AACjD,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,YAAY,EACX,aAAa,EACb,gBAAgB,EAChB,mBAAmB,EACnB,WAAW,EACX,aAAa,EACb,eAAe,EACf,iBAAiB,EACjB,sBAAsB,GACtB,MAAM,wBAAwB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC","sourcesContent":["export type { Static, TSchema } from \"@sinclair/typebox\";\nexport { Type } from \"@sinclair/typebox\";\n\nexport * from \"./api-registry.js\";\nexport * from \"./env-api-keys.js\";\nexport * from \"./models.js\";\nexport * from \"./providers/anthropic.js\";\nexport * from \"./providers/azure-openai-responses.js\";\nexport * from \"./providers/google.js\";\nexport * from \"./providers/google-gemini-cli.js\";\nexport * from \"./providers/google-vertex.js\";\nexport * from \"./providers/openai-completions.js\";\nexport * from \"./providers/openai-responses.js\";\nexport * from \"./providers/register-builtins.js\";\nexport * from \"./stream.js\";\nexport * from \"./types.js\";\nexport * from \"./utils/event-stream.js\";\nexport * from \"./utils/json-parse.js\";\nexport type {\n\tOAuthAuthInfo,\n\tOAuthCredentials,\n\tOAuthLoginCallbacks,\n\tOAuthPrompt,\n\tOAuthProvider,\n\tOAuthProviderId,\n\tOAuthProviderInfo,\n\tOAuthProviderInterface,\n} from \"./utils/oauth/types.js\";\nexport * from \"./utils/overflow.js\";\nexport * from \"./utils/typebox-helpers.js\";\nexport * from \"./utils/validation.js\";\n"]}
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,6 @@ export * from "./stream.js";
|
|
|
14
14
|
export * from "./types.js";
|
|
15
15
|
export * from "./utils/event-stream.js";
|
|
16
16
|
export * from "./utils/json-parse.js";
|
|
17
|
-
export * from "./utils/oauth/index.js";
|
|
18
17
|
export * from "./utils/overflow.js";
|
|
19
18
|
export * from "./utils/typebox-helpers.js";
|
|
20
19
|
export * from "./utils/validation.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,0BAA0B,CAAC;AACzC,cAAc,uCAAuC,CAAC;AACtD,cAAc,uBAAuB,CAAC;AACtC,cAAc,kCAAkC,CAAC;AACjD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mCAAmC,CAAC;AAClD,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC;AACjD,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,0BAA0B,CAAC;AACzC,cAAc,uCAAuC,CAAC;AACtD,cAAc,uBAAuB,CAAC;AACtC,cAAc,kCAAkC,CAAC;AACjD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mCAAmC,CAAC;AAClD,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC;AACjD,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AAWtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC","sourcesContent":["export type { Static, TSchema } from \"@sinclair/typebox\";\nexport { Type } from \"@sinclair/typebox\";\n\nexport * from \"./api-registry.js\";\nexport * from \"./env-api-keys.js\";\nexport * from \"./models.js\";\nexport * from \"./providers/anthropic.js\";\nexport * from \"./providers/azure-openai-responses.js\";\nexport * from \"./providers/google.js\";\nexport * from \"./providers/google-gemini-cli.js\";\nexport * from \"./providers/google-vertex.js\";\nexport * from \"./providers/openai-completions.js\";\nexport * from \"./providers/openai-responses.js\";\nexport * from \"./providers/register-builtins.js\";\nexport * from \"./stream.js\";\nexport * from \"./types.js\";\nexport * from \"./utils/event-stream.js\";\nexport * from \"./utils/json-parse.js\";\nexport type {\n\tOAuthAuthInfo,\n\tOAuthCredentials,\n\tOAuthLoginCallbacks,\n\tOAuthPrompt,\n\tOAuthProvider,\n\tOAuthProviderId,\n\tOAuthProviderInfo,\n\tOAuthProviderInterface,\n} from \"./utils/oauth/types.js\";\nexport * from \"./utils/overflow.js\";\nexport * from \"./utils/typebox-helpers.js\";\nexport * from \"./utils/validation.js\";\n"]}
|
|
@@ -3299,6 +3299,23 @@ export declare const MODELS: {
|
|
|
3299
3299
|
contextWindow: number;
|
|
3300
3300
|
maxTokens: number;
|
|
3301
3301
|
};
|
|
3302
|
+
readonly "gemini-3.1-flash-lite-preview": {
|
|
3303
|
+
id: string;
|
|
3304
|
+
name: string;
|
|
3305
|
+
api: "google-generative-ai";
|
|
3306
|
+
provider: string;
|
|
3307
|
+
baseUrl: string;
|
|
3308
|
+
reasoning: true;
|
|
3309
|
+
input: ("image" | "text")[];
|
|
3310
|
+
cost: {
|
|
3311
|
+
input: number;
|
|
3312
|
+
output: number;
|
|
3313
|
+
cacheRead: number;
|
|
3314
|
+
cacheWrite: number;
|
|
3315
|
+
};
|
|
3316
|
+
contextWindow: number;
|
|
3317
|
+
maxTokens: number;
|
|
3318
|
+
};
|
|
3302
3319
|
readonly "gemini-3.1-pro-preview": {
|
|
3303
3320
|
id: string;
|
|
3304
3321
|
name: string;
|
|
@@ -3488,7 +3505,7 @@ export declare const MODELS: {
|
|
|
3488
3505
|
contextWindow: number;
|
|
3489
3506
|
maxTokens: number;
|
|
3490
3507
|
};
|
|
3491
|
-
readonly "gemini-3-pro-high": {
|
|
3508
|
+
readonly "gemini-3.1-pro-high": {
|
|
3492
3509
|
id: string;
|
|
3493
3510
|
name: string;
|
|
3494
3511
|
api: "google-gemini-cli";
|
|
@@ -3505,7 +3522,7 @@ export declare const MODELS: {
|
|
|
3505
3522
|
contextWindow: number;
|
|
3506
3523
|
maxTokens: number;
|
|
3507
3524
|
};
|
|
3508
|
-
readonly "gemini-3-pro-low": {
|
|
3525
|
+
readonly "gemini-3.1-pro-low": {
|
|
3509
3526
|
id: string;
|
|
3510
3527
|
name: string;
|
|
3511
3528
|
api: "google-gemini-cli";
|
|
@@ -6319,6 +6336,59 @@ export declare const MODELS: {
|
|
|
6319
6336
|
maxTokens: number;
|
|
6320
6337
|
};
|
|
6321
6338
|
};
|
|
6339
|
+
readonly "opencode-go": {
|
|
6340
|
+
readonly "glm-5": {
|
|
6341
|
+
id: string;
|
|
6342
|
+
name: string;
|
|
6343
|
+
api: "openai-completions";
|
|
6344
|
+
provider: string;
|
|
6345
|
+
baseUrl: string;
|
|
6346
|
+
reasoning: true;
|
|
6347
|
+
input: "text"[];
|
|
6348
|
+
cost: {
|
|
6349
|
+
input: number;
|
|
6350
|
+
output: number;
|
|
6351
|
+
cacheRead: number;
|
|
6352
|
+
cacheWrite: number;
|
|
6353
|
+
};
|
|
6354
|
+
contextWindow: number;
|
|
6355
|
+
maxTokens: number;
|
|
6356
|
+
};
|
|
6357
|
+
readonly "kimi-k2.5": {
|
|
6358
|
+
id: string;
|
|
6359
|
+
name: string;
|
|
6360
|
+
api: "openai-completions";
|
|
6361
|
+
provider: string;
|
|
6362
|
+
baseUrl: string;
|
|
6363
|
+
reasoning: true;
|
|
6364
|
+
input: ("image" | "text")[];
|
|
6365
|
+
cost: {
|
|
6366
|
+
input: number;
|
|
6367
|
+
output: number;
|
|
6368
|
+
cacheRead: number;
|
|
6369
|
+
cacheWrite: number;
|
|
6370
|
+
};
|
|
6371
|
+
contextWindow: number;
|
|
6372
|
+
maxTokens: number;
|
|
6373
|
+
};
|
|
6374
|
+
readonly "minimax-m2.5": {
|
|
6375
|
+
id: string;
|
|
6376
|
+
name: string;
|
|
6377
|
+
api: "anthropic-messages";
|
|
6378
|
+
provider: string;
|
|
6379
|
+
baseUrl: string;
|
|
6380
|
+
reasoning: true;
|
|
6381
|
+
input: "text"[];
|
|
6382
|
+
cost: {
|
|
6383
|
+
input: number;
|
|
6384
|
+
output: number;
|
|
6385
|
+
cacheRead: number;
|
|
6386
|
+
cacheWrite: number;
|
|
6387
|
+
};
|
|
6388
|
+
contextWindow: number;
|
|
6389
|
+
maxTokens: number;
|
|
6390
|
+
};
|
|
6391
|
+
};
|
|
6322
6392
|
readonly openrouter: {
|
|
6323
6393
|
readonly "ai21/jamba-large-1.7": {
|
|
6324
6394
|
id: string;
|
|
@@ -6694,6 +6764,23 @@ export declare const MODELS: {
|
|
|
6694
6764
|
contextWindow: number;
|
|
6695
6765
|
maxTokens: number;
|
|
6696
6766
|
};
|
|
6767
|
+
readonly "arcee-ai/trinity-mini": {
|
|
6768
|
+
id: string;
|
|
6769
|
+
name: string;
|
|
6770
|
+
api: "openai-completions";
|
|
6771
|
+
provider: string;
|
|
6772
|
+
baseUrl: string;
|
|
6773
|
+
reasoning: true;
|
|
6774
|
+
input: "text"[];
|
|
6775
|
+
cost: {
|
|
6776
|
+
input: number;
|
|
6777
|
+
output: number;
|
|
6778
|
+
cacheRead: number;
|
|
6779
|
+
cacheWrite: number;
|
|
6780
|
+
};
|
|
6781
|
+
contextWindow: number;
|
|
6782
|
+
maxTokens: number;
|
|
6783
|
+
};
|
|
6697
6784
|
readonly "arcee-ai/trinity-mini:free": {
|
|
6698
6785
|
id: string;
|
|
6699
6786
|
name: string;
|
|
@@ -7204,6 +7291,23 @@ export declare const MODELS: {
|
|
|
7204
7291
|
contextWindow: number;
|
|
7205
7292
|
maxTokens: number;
|
|
7206
7293
|
};
|
|
7294
|
+
readonly "google/gemini-3.1-flash-lite-preview": {
|
|
7295
|
+
id: string;
|
|
7296
|
+
name: string;
|
|
7297
|
+
api: "openai-completions";
|
|
7298
|
+
provider: string;
|
|
7299
|
+
baseUrl: string;
|
|
7300
|
+
reasoning: true;
|
|
7301
|
+
input: ("image" | "text")[];
|
|
7302
|
+
cost: {
|
|
7303
|
+
input: number;
|
|
7304
|
+
output: number;
|
|
7305
|
+
cacheRead: number;
|
|
7306
|
+
cacheWrite: number;
|
|
7307
|
+
};
|
|
7308
|
+
contextWindow: number;
|
|
7309
|
+
maxTokens: number;
|
|
7310
|
+
};
|
|
7207
7311
|
readonly "google/gemini-3.1-pro-preview": {
|
|
7208
7312
|
id: string;
|
|
7209
7313
|
name: string;
|
|
@@ -8751,6 +8855,23 @@ export declare const MODELS: {
|
|
|
8751
8855
|
contextWindow: number;
|
|
8752
8856
|
maxTokens: number;
|
|
8753
8857
|
};
|
|
8858
|
+
readonly "openai/gpt-5.3-chat": {
|
|
8859
|
+
id: string;
|
|
8860
|
+
name: string;
|
|
8861
|
+
api: "openai-completions";
|
|
8862
|
+
provider: string;
|
|
8863
|
+
baseUrl: string;
|
|
8864
|
+
reasoning: false;
|
|
8865
|
+
input: ("image" | "text")[];
|
|
8866
|
+
cost: {
|
|
8867
|
+
input: number;
|
|
8868
|
+
output: number;
|
|
8869
|
+
cacheRead: number;
|
|
8870
|
+
cacheWrite: number;
|
|
8871
|
+
};
|
|
8872
|
+
contextWindow: number;
|
|
8873
|
+
maxTokens: number;
|
|
8874
|
+
};
|
|
8754
8875
|
readonly "openai/gpt-5.3-codex": {
|
|
8755
8876
|
id: string;
|
|
8756
8877
|
name: string;
|
|
@@ -9958,7 +10079,7 @@ export declare const MODELS: {
|
|
|
9958
10079
|
contextWindow: number;
|
|
9959
10080
|
maxTokens: number;
|
|
9960
10081
|
};
|
|
9961
|
-
readonly "upstage/solar-pro-3
|
|
10082
|
+
readonly "upstage/solar-pro-3": {
|
|
9962
10083
|
id: string;
|
|
9963
10084
|
name: string;
|
|
9964
10085
|
api: "openai-completions";
|
|
@@ -11031,6 +11152,23 @@ export declare const MODELS: {
|
|
|
11031
11152
|
contextWindow: number;
|
|
11032
11153
|
maxTokens: number;
|
|
11033
11154
|
};
|
|
11155
|
+
readonly "google/gemini-3.1-flash-lite-preview": {
|
|
11156
|
+
id: string;
|
|
11157
|
+
name: string;
|
|
11158
|
+
api: "anthropic-messages";
|
|
11159
|
+
provider: string;
|
|
11160
|
+
baseUrl: string;
|
|
11161
|
+
reasoning: true;
|
|
11162
|
+
input: ("image" | "text")[];
|
|
11163
|
+
cost: {
|
|
11164
|
+
input: number;
|
|
11165
|
+
output: number;
|
|
11166
|
+
cacheRead: number;
|
|
11167
|
+
cacheWrite: number;
|
|
11168
|
+
};
|
|
11169
|
+
contextWindow: number;
|
|
11170
|
+
maxTokens: number;
|
|
11171
|
+
};
|
|
11034
11172
|
readonly "google/gemini-3.1-pro-preview": {
|
|
11035
11173
|
id: string;
|
|
11036
11174
|
name: string;
|
|
@@ -11949,6 +12087,23 @@ export declare const MODELS: {
|
|
|
11949
12087
|
contextWindow: number;
|
|
11950
12088
|
maxTokens: number;
|
|
11951
12089
|
};
|
|
12090
|
+
readonly "openai/gpt-5.3-chat": {
|
|
12091
|
+
id: string;
|
|
12092
|
+
name: string;
|
|
12093
|
+
api: "anthropic-messages";
|
|
12094
|
+
provider: string;
|
|
12095
|
+
baseUrl: string;
|
|
12096
|
+
reasoning: true;
|
|
12097
|
+
input: ("image" | "text")[];
|
|
12098
|
+
cost: {
|
|
12099
|
+
input: number;
|
|
12100
|
+
output: number;
|
|
12101
|
+
cacheRead: number;
|
|
12102
|
+
cacheWrite: number;
|
|
12103
|
+
};
|
|
12104
|
+
contextWindow: number;
|
|
12105
|
+
maxTokens: number;
|
|
12106
|
+
};
|
|
11952
12107
|
readonly "openai/gpt-5.3-codex": {
|
|
11953
12108
|
id: string;
|
|
11954
12109
|
name: string;
|