@draht/ai 2026.3.3 → 2026.3.5
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 +3 -0
- 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 +176 -4
- package/dist/models.generated.d.ts.map +1 -1
- package/dist/models.generated.js +242 -70
- 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 +23 -5
- 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
|
@@ -63,6 +63,8 @@ Unified LLM API with automatic model discovery, provider configuration, token an
|
|
|
63
63
|
- **Google Gemini CLI** (requires OAuth, see below)
|
|
64
64
|
- **Antigravity** (requires OAuth, see below)
|
|
65
65
|
- **Amazon Bedrock**
|
|
66
|
+
- **OpenCode Zen**
|
|
67
|
+
- **OpenCode Go**
|
|
66
68
|
- **Kimi For Coding** (Moonshot AI, uses Anthropic-compatible API)
|
|
67
69
|
- **Any OpenAI-compatible API**: Ollama, vLLM, LM Studio, etc.
|
|
68
70
|
|
|
@@ -905,6 +907,7 @@ In Node.js environments, you can set environment variables to avoid passing API
|
|
|
905
907
|
| Vercel AI Gateway | `AI_GATEWAY_API_KEY` |
|
|
906
908
|
| zAI | `ZAI_API_KEY` |
|
|
907
909
|
| MiniMax | `MINIMAX_API_KEY` |
|
|
910
|
+
| OpenCode Zen / OpenCode Go | `OPENCODE_API_KEY` |
|
|
908
911
|
| Kimi For Coding | `KIMI_API_KEY` |
|
|
909
912
|
| GitHub Copilot | `COPILOT_GITHUB_TOKEN` or `GH_TOKEN` or `GITHUB_TOKEN` |
|
|
910
913
|
|
|
@@ -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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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";
|
|
@@ -6233,6 +6250,23 @@ export declare const MODELS: {
|
|
|
6233
6250
|
contextWindow: number;
|
|
6234
6251
|
maxTokens: number;
|
|
6235
6252
|
};
|
|
6253
|
+
readonly "gpt-5.4": {
|
|
6254
|
+
id: string;
|
|
6255
|
+
name: string;
|
|
6256
|
+
api: "openai-responses";
|
|
6257
|
+
provider: string;
|
|
6258
|
+
baseUrl: string;
|
|
6259
|
+
reasoning: true;
|
|
6260
|
+
input: ("image" | "text")[];
|
|
6261
|
+
cost: {
|
|
6262
|
+
input: number;
|
|
6263
|
+
output: number;
|
|
6264
|
+
cacheRead: number;
|
|
6265
|
+
cacheWrite: number;
|
|
6266
|
+
};
|
|
6267
|
+
contextWindow: number;
|
|
6268
|
+
maxTokens: number;
|
|
6269
|
+
};
|
|
6236
6270
|
readonly "kimi-k2.5": {
|
|
6237
6271
|
id: string;
|
|
6238
6272
|
name: string;
|
|
@@ -6301,13 +6335,49 @@ export declare const MODELS: {
|
|
|
6301
6335
|
contextWindow: number;
|
|
6302
6336
|
maxTokens: number;
|
|
6303
6337
|
};
|
|
6304
|
-
|
|
6338
|
+
};
|
|
6339
|
+
readonly "opencode-go": {
|
|
6340
|
+
readonly "glm-5": {
|
|
6305
6341
|
id: string;
|
|
6306
6342
|
name: string;
|
|
6307
6343
|
api: "openai-completions";
|
|
6308
6344
|
provider: string;
|
|
6309
6345
|
baseUrl: string;
|
|
6310
|
-
reasoning:
|
|
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;
|
|
6311
6381
|
input: "text"[];
|
|
6312
6382
|
cost: {
|
|
6313
6383
|
input: number;
|
|
@@ -7323,6 +7393,23 @@ export declare const MODELS: {
|
|
|
7323
7393
|
contextWindow: number;
|
|
7324
7394
|
maxTokens: number;
|
|
7325
7395
|
};
|
|
7396
|
+
readonly "inception/mercury-2": {
|
|
7397
|
+
id: string;
|
|
7398
|
+
name: string;
|
|
7399
|
+
api: "openai-completions";
|
|
7400
|
+
provider: string;
|
|
7401
|
+
baseUrl: string;
|
|
7402
|
+
reasoning: true;
|
|
7403
|
+
input: "text"[];
|
|
7404
|
+
cost: {
|
|
7405
|
+
input: number;
|
|
7406
|
+
output: number;
|
|
7407
|
+
cacheRead: number;
|
|
7408
|
+
cacheWrite: number;
|
|
7409
|
+
};
|
|
7410
|
+
contextWindow: number;
|
|
7411
|
+
maxTokens: number;
|
|
7412
|
+
};
|
|
7326
7413
|
readonly "inception/mercury-coder": {
|
|
7327
7414
|
id: string;
|
|
7328
7415
|
name: string;
|
|
@@ -8785,6 +8872,23 @@ export declare const MODELS: {
|
|
|
8785
8872
|
contextWindow: number;
|
|
8786
8873
|
maxTokens: number;
|
|
8787
8874
|
};
|
|
8875
|
+
readonly "openai/gpt-5.3-chat": {
|
|
8876
|
+
id: string;
|
|
8877
|
+
name: string;
|
|
8878
|
+
api: "openai-completions";
|
|
8879
|
+
provider: string;
|
|
8880
|
+
baseUrl: string;
|
|
8881
|
+
reasoning: false;
|
|
8882
|
+
input: ("image" | "text")[];
|
|
8883
|
+
cost: {
|
|
8884
|
+
input: number;
|
|
8885
|
+
output: number;
|
|
8886
|
+
cacheRead: number;
|
|
8887
|
+
cacheWrite: number;
|
|
8888
|
+
};
|
|
8889
|
+
contextWindow: number;
|
|
8890
|
+
maxTokens: number;
|
|
8891
|
+
};
|
|
8788
8892
|
readonly "openai/gpt-5.3-codex": {
|
|
8789
8893
|
id: string;
|
|
8790
8894
|
name: string;
|
|
@@ -8802,6 +8906,40 @@ export declare const MODELS: {
|
|
|
8802
8906
|
contextWindow: number;
|
|
8803
8907
|
maxTokens: number;
|
|
8804
8908
|
};
|
|
8909
|
+
readonly "openai/gpt-5.4": {
|
|
8910
|
+
id: string;
|
|
8911
|
+
name: string;
|
|
8912
|
+
api: "openai-completions";
|
|
8913
|
+
provider: string;
|
|
8914
|
+
baseUrl: string;
|
|
8915
|
+
reasoning: true;
|
|
8916
|
+
input: ("image" | "text")[];
|
|
8917
|
+
cost: {
|
|
8918
|
+
input: number;
|
|
8919
|
+
output: number;
|
|
8920
|
+
cacheRead: number;
|
|
8921
|
+
cacheWrite: number;
|
|
8922
|
+
};
|
|
8923
|
+
contextWindow: number;
|
|
8924
|
+
maxTokens: number;
|
|
8925
|
+
};
|
|
8926
|
+
readonly "openai/gpt-5.4-pro": {
|
|
8927
|
+
id: string;
|
|
8928
|
+
name: string;
|
|
8929
|
+
api: "openai-completions";
|
|
8930
|
+
provider: string;
|
|
8931
|
+
baseUrl: string;
|
|
8932
|
+
reasoning: true;
|
|
8933
|
+
input: ("image" | "text")[];
|
|
8934
|
+
cost: {
|
|
8935
|
+
input: number;
|
|
8936
|
+
output: number;
|
|
8937
|
+
cacheRead: number;
|
|
8938
|
+
cacheWrite: number;
|
|
8939
|
+
};
|
|
8940
|
+
contextWindow: number;
|
|
8941
|
+
maxTokens: number;
|
|
8942
|
+
};
|
|
8805
8943
|
readonly "openai/gpt-oss-120b": {
|
|
8806
8944
|
id: string;
|
|
8807
8945
|
name: string;
|
|
@@ -11099,6 +11237,23 @@ export declare const MODELS: {
|
|
|
11099
11237
|
contextWindow: number;
|
|
11100
11238
|
maxTokens: number;
|
|
11101
11239
|
};
|
|
11240
|
+
readonly "inception/mercury-2": {
|
|
11241
|
+
id: string;
|
|
11242
|
+
name: string;
|
|
11243
|
+
api: "anthropic-messages";
|
|
11244
|
+
provider: string;
|
|
11245
|
+
baseUrl: string;
|
|
11246
|
+
reasoning: true;
|
|
11247
|
+
input: "text"[];
|
|
11248
|
+
cost: {
|
|
11249
|
+
input: number;
|
|
11250
|
+
output: number;
|
|
11251
|
+
cacheRead: number;
|
|
11252
|
+
cacheWrite: number;
|
|
11253
|
+
};
|
|
11254
|
+
contextWindow: number;
|
|
11255
|
+
maxTokens: number;
|
|
11256
|
+
};
|
|
11102
11257
|
readonly "inception/mercury-coder-small": {
|
|
11103
11258
|
id: string;
|
|
11104
11259
|
name: string;
|
|
@@ -12034,6 +12189,23 @@ export declare const MODELS: {
|
|
|
12034
12189
|
contextWindow: number;
|
|
12035
12190
|
maxTokens: number;
|
|
12036
12191
|
};
|
|
12192
|
+
readonly "openai/gpt-5.4": {
|
|
12193
|
+
id: string;
|
|
12194
|
+
name: string;
|
|
12195
|
+
api: "anthropic-messages";
|
|
12196
|
+
provider: string;
|
|
12197
|
+
baseUrl: string;
|
|
12198
|
+
reasoning: true;
|
|
12199
|
+
input: ("image" | "text")[];
|
|
12200
|
+
cost: {
|
|
12201
|
+
input: number;
|
|
12202
|
+
output: number;
|
|
12203
|
+
cacheRead: number;
|
|
12204
|
+
cacheWrite: number;
|
|
12205
|
+
};
|
|
12206
|
+
contextWindow: number;
|
|
12207
|
+
maxTokens: number;
|
|
12208
|
+
};
|
|
12037
12209
|
readonly "openai/gpt-oss-120b": {
|
|
12038
12210
|
id: string;
|
|
12039
12211
|
name: string;
|