@psnext/slingcli 2.5.20260617-1 → 2.5.20260617-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.
Files changed (64) hide show
  1. package/node_modules/@earendil-works/pi-agent-core/package.json +2 -2
  2. package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.js +21 -57
  3. package/node_modules/@earendil-works/pi-ai/dist/models.generated.js +116 -155
  4. package/node_modules/@earendil-works/pi-ai/dist/models.js +4 -1
  5. package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.js +52 -34
  6. package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.js +11 -9
  7. package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.js +7 -4
  8. package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare.js +4 -3
  9. package/node_modules/@earendil-works/pi-ai/dist/providers/google-vertex.js +15 -5
  10. package/node_modules/@earendil-works/pi-ai/dist/providers/google.js +2 -1
  11. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex-responses.js +18 -17
  12. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-completions.js +21 -8
  13. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses-shared.js +2 -1
  14. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses.js +8 -7
  15. package/node_modules/@earendil-works/pi-ai/dist/providers/simple-options.js +1 -0
  16. package/node_modules/@earendil-works/pi-ai/dist/stream.js +1 -1
  17. package/node_modules/@earendil-works/pi-ai/dist/utils/node-http-proxy.js +17 -22
  18. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/anthropic.js +2 -1
  19. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/openai-codex.js +3 -2
  20. package/node_modules/@earendil-works/pi-ai/dist/utils/provider-env.js +44 -0
  21. package/node_modules/@earendil-works/pi-ai/package.json +1 -1
  22. package/node_modules/@earendil-works/pi-coding-agent/dist/bun/restore-sandbox-env.js +4 -0
  23. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/args.js +1 -1
  24. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.js +10 -7
  25. package/node_modules/@earendil-works/pi-coding-agent/dist/core/auth-storage.js +8 -1
  26. package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/branch-summarization.js +2 -2
  27. package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/compaction.js +10 -10
  28. package/node_modules/@earendil-works/pi-coding-agent/dist/core/export-html/vendor/marked.min.js +75 -3
  29. package/node_modules/@earendil-works/pi-coding-agent/dist/core/http-dispatcher.js +17 -1
  30. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-registry.js +8 -4
  31. package/node_modules/@earendil-works/pi-coding-agent/dist/core/project-trust.js +1 -1
  32. package/node_modules/@earendil-works/pi-coding-agent/dist/core/provider-attribution.js +10 -0
  33. package/node_modules/@earendil-works/pi-coding-agent/dist/core/resolve-config-value.js +19 -19
  34. package/node_modules/@earendil-works/pi-coding-agent/dist/core/sdk.js +2 -0
  35. package/node_modules/@earendil-works/pi-coding-agent/dist/core/system-prompt.js +6 -6
  36. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/bash.js +4 -0
  37. package/node_modules/@earendil-works/pi-coding-agent/dist/main.js +17 -5
  38. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/footer.js +4 -0
  39. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/login-dialog.js +0 -1
  40. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/session-selector.js +0 -5
  41. package/node_modules/@earendil-works/pi-coding-agent/dist/package-manager-cli.js +6 -6
  42. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/child-process.js +23 -5
  43. package/node_modules/@earendil-works/pi-coding-agent/npm-shrinkwrap.json +17 -17
  44. package/node_modules/@earendil-works/pi-coding-agent/package.json +4 -4
  45. package/node_modules/@earendil-works/pi-tui/dist/components/editor.js +5 -1
  46. package/node_modules/@earendil-works/pi-tui/package.json +2 -2
  47. package/node_modules/marked/README.md +13 -4
  48. package/node_modules/marked/bin/main.js +16 -14
  49. package/node_modules/marked/bin/marked.js +2 -1
  50. package/node_modules/marked/lib/marked.d.ts +157 -125
  51. package/node_modules/marked/lib/marked.esm.js +67 -2179
  52. package/node_modules/marked/lib/marked.esm.js.map +3 -3
  53. package/node_modules/marked/lib/marked.umd.js +67 -2201
  54. package/node_modules/marked/lib/marked.umd.js.map +3 -3
  55. package/node_modules/marked/man/marked.1 +4 -2
  56. package/node_modules/marked/man/marked.1.md +2 -1
  57. package/node_modules/marked/package.json +27 -35
  58. package/package.json +6 -6
  59. package/slingshot/index.js +253 -253
  60. package/node_modules/marked/lib/marked.cjs +0 -2211
  61. package/node_modules/marked/lib/marked.cjs.map +0 -7
  62. package/node_modules/marked/lib/marked.d.cts +0 -728
  63. package/node_modules/marked/marked.min.js +0 -69
  64. /package/node_modules/marked/{LICENSE.md → LICENSE} +0 -0
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@earendil-works/pi-agent-core",
3
- "version": "0.79.3",
3
+ "version": "0.79.6",
4
4
  "description": "General-purpose agent with transport abstraction, state management, and attachment support",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -29,7 +29,7 @@
29
29
  "prepublishOnly": "npm run clean && npm run build"
30
30
  },
31
31
  "dependencies": {
32
- "@earendil-works/pi-ai": "^0.79.3",
32
+ "@earendil-works/pi-ai": "^0.79.6",
33
33
  "ignore": "7.0.5",
34
34
  "typebox": "1.1.38",
35
35
  "yaml": "2.9.0"
@@ -26,40 +26,13 @@ if (typeof process !== "undefined" && (process.versions?.node || process.version
26
26
  _join = m.join;
27
27
  });
28
28
  }
29
- let _procEnvCache = null;
30
- /**
31
- * Fallback for https://github.com/oven-sh/bun/issues/27802
32
- * Bun compiled binaries have an empty `process.env` inside sandbox
33
- * environments on Linux. We can recover the env from `/proc/self/environ`.
34
- */
35
- function getProcEnv(key) {
36
- if (!process.versions?.bun)
37
- return undefined;
38
- if (typeof process === "undefined")
39
- return undefined;
40
- // If process.env already has entries, the bug is not triggered.
41
- if (Object.keys(process.env).length > 0)
42
- return undefined;
43
- if (_procEnvCache === null) {
44
- _procEnvCache = new Map();
45
- try {
46
- const { readFileSync } = require("node:fs");
47
- const data = readFileSync("/proc/self/environ", "utf-8");
48
- for (const entry of data.split("\0")) {
49
- const idx = entry.indexOf("=");
50
- if (idx > 0) {
51
- _procEnvCache.set(entry.slice(0, idx), entry.slice(idx + 1));
52
- }
53
- }
54
- }
55
- catch {
56
- // /proc/self/environ may not be readable.
57
- }
58
- }
59
- return _procEnvCache.get(key);
60
- }
29
+ import { getProviderEnvValue } from "./utils/provider-env.js";
61
30
  let cachedVertexAdcCredentialsExists = null;
62
- function hasVertexAdcCredentials() {
31
+ function hasVertexAdcCredentials(env) {
32
+ const explicitCredentialsPath = env?.GOOGLE_APPLICATION_CREDENTIALS;
33
+ if (explicitCredentialsPath) {
34
+ return _existsSync ? _existsSync(explicitCredentialsPath) : false;
35
+ }
63
36
  if (cachedVertexAdcCredentialsExists === null) {
64
37
  // If node modules haven't loaded yet (async import race at startup),
65
38
  // return false WITHOUT caching so the next call retries once they're ready.
@@ -73,7 +46,7 @@ function hasVertexAdcCredentials() {
73
46
  return false;
74
47
  }
75
48
  // Check GOOGLE_APPLICATION_CREDENTIALS env var first (standard way)
76
- const gacPath = process.env.GOOGLE_APPLICATION_CREDENTIALS || getProcEnv("GOOGLE_APPLICATION_CREDENTIALS");
49
+ const gacPath = getProviderEnvValue("GOOGLE_APPLICATION_CREDENTIALS", env);
77
50
  if (gacPath) {
78
51
  cachedVertexAdcCredentialsExists = _existsSync(gacPath);
79
52
  }
@@ -128,27 +101,24 @@ function getApiKeyEnvVars(provider) {
128
101
  const envVar = envMap[provider];
129
102
  return envVar ? [envVar] : undefined;
130
103
  }
131
- export function findEnvKeys(provider) {
104
+ export function findEnvKeys(provider, env) {
132
105
  const envVars = getApiKeyEnvVars(provider);
133
106
  if (!envVars)
134
107
  return undefined;
135
- const found = envVars.filter((envVar) => !!process.env[envVar] || !!getProcEnv(envVar));
108
+ const found = envVars.filter((envVar) => !!getProviderEnvValue(envVar, env));
136
109
  return found.length > 0 ? found : undefined;
137
110
  }
138
- export function getEnvApiKey(provider) {
139
- const envKeys = findEnvKeys(provider);
111
+ export function getEnvApiKey(provider, env) {
112
+ const envKeys = findEnvKeys(provider, env);
140
113
  if (envKeys?.[0]) {
141
- return process.env[envKeys[0]] || getProcEnv(envKeys[0]);
114
+ return getProviderEnvValue(envKeys[0], env);
142
115
  }
143
116
  // Vertex AI supports either an explicit API key or Application Default Credentials.
144
117
  // Auth is configured via `gcloud auth application-default login`.
145
118
  if (provider === "google-vertex") {
146
- const hasCredentials = hasVertexAdcCredentials();
147
- const hasProject = !!(process.env.GOOGLE_CLOUD_PROJECT ||
148
- process.env.GCLOUD_PROJECT ||
149
- getProcEnv("GOOGLE_CLOUD_PROJECT") ||
150
- getProcEnv("GCLOUD_PROJECT"));
151
- const hasLocation = !!(process.env.GOOGLE_CLOUD_LOCATION || getProcEnv("GOOGLE_CLOUD_LOCATION"));
119
+ const hasCredentials = hasVertexAdcCredentials(env);
120
+ const hasProject = !!(getProviderEnvValue("GOOGLE_CLOUD_PROJECT", env) || getProviderEnvValue("GCLOUD_PROJECT", env));
121
+ const hasLocation = !!getProviderEnvValue("GOOGLE_CLOUD_LOCATION", env);
152
122
  if (hasCredentials && hasProject && hasLocation) {
153
123
  return "<authenticated>";
154
124
  }
@@ -161,18 +131,12 @@ export function getEnvApiKey(provider) {
161
131
  // 4. AWS_CONTAINER_CREDENTIALS_RELATIVE_URI - ECS task roles
162
132
  // 5. AWS_CONTAINER_CREDENTIALS_FULL_URI - ECS task roles (full URI)
163
133
  // 6. AWS_WEB_IDENTITY_TOKEN_FILE - IRSA (IAM Roles for Service Accounts)
164
- if (process.env.AWS_PROFILE ||
165
- (process.env.AWS_ACCESS_KEY_ID && process.env.AWS_SECRET_ACCESS_KEY) ||
166
- process.env.AWS_BEARER_TOKEN_BEDROCK ||
167
- process.env.AWS_CONTAINER_CREDENTIALS_RELATIVE_URI ||
168
- process.env.AWS_CONTAINER_CREDENTIALS_FULL_URI ||
169
- process.env.AWS_WEB_IDENTITY_TOKEN_FILE ||
170
- getProcEnv("AWS_PROFILE") ||
171
- (getProcEnv("AWS_ACCESS_KEY_ID") && getProcEnv("AWS_SECRET_ACCESS_KEY")) ||
172
- getProcEnv("AWS_BEARER_TOKEN_BEDROCK") ||
173
- getProcEnv("AWS_CONTAINER_CREDENTIALS_RELATIVE_URI") ||
174
- getProcEnv("AWS_CONTAINER_CREDENTIALS_FULL_URI") ||
175
- getProcEnv("AWS_WEB_IDENTITY_TOKEN_FILE")) {
134
+ if (getProviderEnvValue("AWS_PROFILE", env) ||
135
+ (getProviderEnvValue("AWS_ACCESS_KEY_ID", env) && getProviderEnvValue("AWS_SECRET_ACCESS_KEY", env)) ||
136
+ getProviderEnvValue("AWS_BEARER_TOKEN_BEDROCK", env) ||
137
+ getProviderEnvValue("AWS_CONTAINER_CREDENTIALS_RELATIVE_URI", env) ||
138
+ getProviderEnvValue("AWS_CONTAINER_CREDENTIALS_FULL_URI", env) ||
139
+ getProviderEnvValue("AWS_WEB_IDENTITY_TOKEN_FILE", env)) {
176
140
  return "<authenticated>";
177
141
  }
178
142
  }
@@ -4227,7 +4227,7 @@ export const MODELS = {
4227
4227
  headers: { "User-Agent": "GitHubCopilotChat/0.35.0", "Editor-Version": "vscode/1.107.0", "Editor-Plugin-Version": "copilot-chat/0.35.0", "Copilot-Integration-Id": "vscode-chat" },
4228
4228
  compat: { "forceAdaptiveThinking": true, "supportsTemperature": false },
4229
4229
  reasoning: true,
4230
- thinkingLevelMap: { "xhigh": "xhigh" },
4230
+ thinkingLevelMap: { "xhigh": "xhigh", "minimal": "low" },
4231
4231
  input: ["text", "image"],
4232
4232
  cost: {
4233
4233
  input: 5,
@@ -4247,7 +4247,7 @@ export const MODELS = {
4247
4247
  headers: { "User-Agent": "GitHubCopilotChat/0.35.0", "Editor-Version": "vscode/1.107.0", "Editor-Plugin-Version": "copilot-chat/0.35.0", "Copilot-Integration-Id": "vscode-chat" },
4248
4248
  compat: { "forceAdaptiveThinking": true, "supportsTemperature": false },
4249
4249
  reasoning: true,
4250
- thinkingLevelMap: { "xhigh": "xhigh" },
4250
+ thinkingLevelMap: { "xhigh": "xhigh", "minimal": "low" },
4251
4251
  input: ["text", "image"],
4252
4252
  cost: {
4253
4253
  input: 5,
@@ -4305,6 +4305,7 @@ export const MODELS = {
4305
4305
  headers: { "User-Agent": "GitHubCopilotChat/0.35.0", "Editor-Version": "vscode/1.107.0", "Editor-Plugin-Version": "copilot-chat/0.35.0", "Copilot-Integration-Id": "vscode-chat" },
4306
4306
  compat: { "forceAdaptiveThinking": true },
4307
4307
  reasoning: true,
4308
+ thinkingLevelMap: { "minimal": "low", "xhigh": "max" },
4308
4309
  input: ["text", "image"],
4309
4310
  cost: {
4310
4311
  input: 3,
@@ -4801,11 +4802,12 @@ export const MODELS = {
4801
4802
  provider: "google",
4802
4803
  baseUrl: "https://generativelanguage.googleapis.com/v1beta",
4803
4804
  reasoning: true,
4805
+ thinkingLevelMap: { "off": null },
4804
4806
  input: ["text", "image"],
4805
4807
  cost: {
4806
- input: 0.3,
4807
- output: 2.5,
4808
- cacheRead: 0.075,
4808
+ input: 1.5,
4809
+ output: 9,
4810
+ cacheRead: 0.15,
4809
4811
  cacheWrite: 0,
4810
4812
  },
4811
4813
  contextWindow: 1048576,
@@ -4818,10 +4820,11 @@ export const MODELS = {
4818
4820
  provider: "google",
4819
4821
  baseUrl: "https://generativelanguage.googleapis.com/v1beta",
4820
4822
  reasoning: true,
4823
+ thinkingLevelMap: { "off": null },
4821
4824
  input: ["text", "image"],
4822
4825
  cost: {
4823
- input: 0.1,
4824
- output: 0.4,
4826
+ input: 0.25,
4827
+ output: 1.5,
4825
4828
  cacheRead: 0.025,
4826
4829
  cacheWrite: 0,
4827
4830
  },
@@ -4902,94 +4905,9 @@ export const MODELS = {
4902
4905
  },
4903
4906
  },
4904
4907
  "google-vertex": {
4905
- "gemini-1.5-flash": {
4906
- id: "gemini-1.5-flash",
4907
- name: "Gemini 1.5 Flash (Vertex)",
4908
- api: "google-vertex",
4909
- provider: "google-vertex",
4910
- baseUrl: "https://{location}-aiplatform.googleapis.com",
4911
- reasoning: false,
4912
- input: ["text", "image"],
4913
- cost: {
4914
- input: 0.075,
4915
- output: 0.3,
4916
- cacheRead: 0.01875,
4917
- cacheWrite: 0,
4918
- },
4919
- contextWindow: 1000000,
4920
- maxTokens: 8192,
4921
- },
4922
- "gemini-1.5-flash-8b": {
4923
- id: "gemini-1.5-flash-8b",
4924
- name: "Gemini 1.5 Flash-8B (Vertex)",
4925
- api: "google-vertex",
4926
- provider: "google-vertex",
4927
- baseUrl: "https://{location}-aiplatform.googleapis.com",
4928
- reasoning: false,
4929
- input: ["text", "image"],
4930
- cost: {
4931
- input: 0.0375,
4932
- output: 0.15,
4933
- cacheRead: 0.01,
4934
- cacheWrite: 0,
4935
- },
4936
- contextWindow: 1000000,
4937
- maxTokens: 8192,
4938
- },
4939
- "gemini-1.5-pro": {
4940
- id: "gemini-1.5-pro",
4941
- name: "Gemini 1.5 Pro (Vertex)",
4942
- api: "google-vertex",
4943
- provider: "google-vertex",
4944
- baseUrl: "https://{location}-aiplatform.googleapis.com",
4945
- reasoning: false,
4946
- input: ["text", "image"],
4947
- cost: {
4948
- input: 1.25,
4949
- output: 5,
4950
- cacheRead: 0.3125,
4951
- cacheWrite: 0,
4952
- },
4953
- contextWindow: 1000000,
4954
- maxTokens: 8192,
4955
- },
4956
- "gemini-2.0-flash": {
4957
- id: "gemini-2.0-flash",
4958
- name: "Gemini 2.0 Flash (Vertex)",
4959
- api: "google-vertex",
4960
- provider: "google-vertex",
4961
- baseUrl: "https://{location}-aiplatform.googleapis.com",
4962
- reasoning: false,
4963
- input: ["text", "image"],
4964
- cost: {
4965
- input: 0.15,
4966
- output: 0.6,
4967
- cacheRead: 0.0375,
4968
- cacheWrite: 0,
4969
- },
4970
- contextWindow: 1048576,
4971
- maxTokens: 8192,
4972
- },
4973
- "gemini-2.0-flash-lite": {
4974
- id: "gemini-2.0-flash-lite",
4975
- name: "Gemini 2.0 Flash Lite (Vertex)",
4976
- api: "google-vertex",
4977
- provider: "google-vertex",
4978
- baseUrl: "https://{location}-aiplatform.googleapis.com",
4979
- reasoning: true,
4980
- input: ["text", "image"],
4981
- cost: {
4982
- input: 0.075,
4983
- output: 0.3,
4984
- cacheRead: 0.01875,
4985
- cacheWrite: 0,
4986
- },
4987
- contextWindow: 1048576,
4988
- maxTokens: 65536,
4989
- },
4990
4908
  "gemini-2.5-flash": {
4991
4909
  id: "gemini-2.5-flash",
4992
- name: "Gemini 2.5 Flash (Vertex)",
4910
+ name: "Gemini 2.5 Flash",
4993
4911
  api: "google-vertex",
4994
4912
  provider: "google-vertex",
4995
4913
  baseUrl: "https://{location}-aiplatform.googleapis.com",
@@ -5006,24 +4924,7 @@ export const MODELS = {
5006
4924
  },
5007
4925
  "gemini-2.5-flash-lite": {
5008
4926
  id: "gemini-2.5-flash-lite",
5009
- name: "Gemini 2.5 Flash Lite (Vertex)",
5010
- api: "google-vertex",
5011
- provider: "google-vertex",
5012
- baseUrl: "https://{location}-aiplatform.googleapis.com",
5013
- reasoning: true,
5014
- input: ["text", "image"],
5015
- cost: {
5016
- input: 0.1,
5017
- output: 0.4,
5018
- cacheRead: 0.01,
5019
- cacheWrite: 0,
5020
- },
5021
- contextWindow: 1048576,
5022
- maxTokens: 65536,
5023
- },
5024
- "gemini-2.5-flash-lite-preview-09-2025": {
5025
- id: "gemini-2.5-flash-lite-preview-09-2025",
5026
- name: "Gemini 2.5 Flash Lite Preview 09-25 (Vertex)",
4927
+ name: "Gemini 2.5 Flash-Lite",
5027
4928
  api: "google-vertex",
5028
4929
  provider: "google-vertex",
5029
4930
  baseUrl: "https://{location}-aiplatform.googleapis.com",
@@ -5040,7 +4941,7 @@ export const MODELS = {
5040
4941
  },
5041
4942
  "gemini-2.5-pro": {
5042
4943
  id: "gemini-2.5-pro",
5043
- name: "Gemini 2.5 Pro (Vertex)",
4944
+ name: "Gemini 2.5 Pro",
5044
4945
  api: "google-vertex",
5045
4946
  provider: "google-vertex",
5046
4947
  baseUrl: "https://{location}-aiplatform.googleapis.com",
@@ -5057,7 +4958,7 @@ export const MODELS = {
5057
4958
  },
5058
4959
  "gemini-3-flash-preview": {
5059
4960
  id: "gemini-3-flash-preview",
5060
- name: "Gemini 3 Flash Preview (Vertex)",
4961
+ name: "Gemini 3 Flash Preview",
5061
4962
  api: "google-vertex",
5062
4963
  provider: "google-vertex",
5063
4964
  baseUrl: "https://{location}-aiplatform.googleapis.com",
@@ -5073,27 +4974,27 @@ export const MODELS = {
5073
4974
  contextWindow: 1048576,
5074
4975
  maxTokens: 65536,
5075
4976
  },
5076
- "gemini-3-pro-preview": {
5077
- id: "gemini-3-pro-preview",
5078
- name: "Gemini 3 Pro Preview (Vertex)",
4977
+ "gemini-3.1-flash-lite": {
4978
+ id: "gemini-3.1-flash-lite",
4979
+ name: "Gemini 3.1 Flash Lite",
5079
4980
  api: "google-vertex",
5080
4981
  provider: "google-vertex",
5081
4982
  baseUrl: "https://{location}-aiplatform.googleapis.com",
5082
4983
  reasoning: true,
5083
- thinkingLevelMap: { "off": null, "minimal": null, "low": "LOW", "medium": null, "high": "HIGH" },
4984
+ thinkingLevelMap: { "off": null },
5084
4985
  input: ["text", "image"],
5085
4986
  cost: {
5086
- input: 2,
5087
- output: 12,
5088
- cacheRead: 0.2,
4987
+ input: 0.25,
4988
+ output: 1.5,
4989
+ cacheRead: 0.025,
5089
4990
  cacheWrite: 0,
5090
4991
  },
5091
- contextWindow: 1000000,
5092
- maxTokens: 64000,
4992
+ contextWindow: 1048576,
4993
+ maxTokens: 65536,
5093
4994
  },
5094
4995
  "gemini-3.1-pro-preview": {
5095
4996
  id: "gemini-3.1-pro-preview",
5096
- name: "Gemini 3.1 Pro Preview (Vertex)",
4997
+ name: "Gemini 3.1 Pro Preview",
5097
4998
  api: "google-vertex",
5098
4999
  provider: "google-vertex",
5099
5000
  baseUrl: "https://{location}-aiplatform.googleapis.com",
@@ -5111,7 +5012,7 @@ export const MODELS = {
5111
5012
  },
5112
5013
  "gemini-3.1-pro-preview-customtools": {
5113
5014
  id: "gemini-3.1-pro-preview-customtools",
5114
- name: "Gemini 3.1 Pro Preview Custom Tools (Vertex)",
5015
+ name: "Gemini 3.1 Pro Preview Custom Tools",
5115
5016
  api: "google-vertex",
5116
5017
  provider: "google-vertex",
5117
5018
  baseUrl: "https://{location}-aiplatform.googleapis.com",
@@ -5127,6 +5028,60 @@ export const MODELS = {
5127
5028
  contextWindow: 1048576,
5128
5029
  maxTokens: 65536,
5129
5030
  },
5031
+ "gemini-3.5-flash": {
5032
+ id: "gemini-3.5-flash",
5033
+ name: "Gemini 3.5 Flash",
5034
+ api: "google-vertex",
5035
+ provider: "google-vertex",
5036
+ baseUrl: "https://{location}-aiplatform.googleapis.com",
5037
+ reasoning: true,
5038
+ thinkingLevelMap: { "off": null },
5039
+ input: ["text", "image"],
5040
+ cost: {
5041
+ input: 1.5,
5042
+ output: 9,
5043
+ cacheRead: 0.15,
5044
+ cacheWrite: 0,
5045
+ },
5046
+ contextWindow: 1048576,
5047
+ maxTokens: 65536,
5048
+ },
5049
+ "gemini-flash-latest": {
5050
+ id: "gemini-flash-latest",
5051
+ name: "Gemini Flash Latest",
5052
+ api: "google-vertex",
5053
+ provider: "google-vertex",
5054
+ baseUrl: "https://{location}-aiplatform.googleapis.com",
5055
+ reasoning: true,
5056
+ thinkingLevelMap: { "off": null },
5057
+ input: ["text", "image"],
5058
+ cost: {
5059
+ input: 1.5,
5060
+ output: 9,
5061
+ cacheRead: 0.15,
5062
+ cacheWrite: 0,
5063
+ },
5064
+ contextWindow: 1048576,
5065
+ maxTokens: 65536,
5066
+ },
5067
+ "gemini-flash-lite-latest": {
5068
+ id: "gemini-flash-lite-latest",
5069
+ name: "Gemini Flash-Lite Latest",
5070
+ api: "google-vertex",
5071
+ provider: "google-vertex",
5072
+ baseUrl: "https://{location}-aiplatform.googleapis.com",
5073
+ reasoning: true,
5074
+ thinkingLevelMap: { "off": null },
5075
+ input: ["text", "image"],
5076
+ cost: {
5077
+ input: 0.25,
5078
+ output: 1.5,
5079
+ cacheRead: 0.025,
5080
+ cacheWrite: 0,
5081
+ },
5082
+ contextWindow: 1048576,
5083
+ maxTokens: 65536,
5084
+ },
5130
5085
  },
5131
5086
  "groq": {
5132
5087
  "llama-3.1-8b-instant": {
@@ -6457,6 +6412,7 @@ export const MODELS = {
6457
6412
  baseUrl: "https://api.moonshot.ai/v1",
6458
6413
  compat: { "supportsStore": false, "supportsDeveloperRole": false, "supportsReasoningEffort": false, "maxTokensField": "max_tokens", "supportsStrictMode": false, "thinkingFormat": "deepseek" },
6459
6414
  reasoning: true,
6415
+ thinkingLevelMap: { "off": null },
6460
6416
  input: ["text", "image"],
6461
6417
  cost: {
6462
6418
  input: 0.95,
@@ -6475,6 +6431,7 @@ export const MODELS = {
6475
6431
  baseUrl: "https://api.moonshot.ai/v1",
6476
6432
  compat: { "supportsStore": false, "supportsDeveloperRole": false, "supportsReasoningEffort": false, "maxTokensField": "max_tokens", "supportsStrictMode": false, "thinkingFormat": "deepseek" },
6477
6433
  reasoning: true,
6434
+ thinkingLevelMap: { "off": null },
6478
6435
  input: ["text", "image"],
6479
6436
  cost: {
6480
6437
  input: 1.9,
@@ -6621,6 +6578,7 @@ export const MODELS = {
6621
6578
  baseUrl: "https://api.moonshot.cn/v1",
6622
6579
  compat: { "supportsStore": false, "supportsDeveloperRole": false, "supportsReasoningEffort": false, "maxTokensField": "max_tokens", "supportsStrictMode": false, "thinkingFormat": "deepseek" },
6623
6580
  reasoning: true,
6581
+ thinkingLevelMap: { "off": null },
6624
6582
  input: ["text", "image"],
6625
6583
  cost: {
6626
6584
  input: 0.95,
@@ -6639,6 +6597,7 @@ export const MODELS = {
6639
6597
  baseUrl: "https://api.moonshot.cn/v1",
6640
6598
  compat: { "supportsStore": false, "supportsDeveloperRole": false, "supportsReasoningEffort": false, "maxTokensField": "max_tokens", "supportsStrictMode": false, "thinkingFormat": "deepseek" },
6641
6599
  reasoning: true,
6600
+ thinkingLevelMap: { "off": null },
6642
6601
  input: ["text", "image"],
6643
6602
  cost: {
6644
6603
  input: 1.9,
@@ -8012,7 +7971,7 @@ export const MODELS = {
8012
7971
  api: "openai-completions",
8013
7972
  provider: "opencode",
8014
7973
  baseUrl: "https://opencode.ai/zen/v1",
8015
- compat: { "maxTokensField": "max_tokens", "supportsLongCacheRetention": false, "requiresReasoningContentOnAssistantMessages": true, "thinkingFormat": "deepseek" },
7974
+ compat: { "maxTokensField": "max_tokens", "supportsLongCacheRetention": false, "requiresReasoningContentOnAssistantMessages": true },
8016
7975
  reasoning: true,
8017
7976
  thinkingLevelMap: { "minimal": null, "low": null, "medium": null, "high": "high", "xhigh": "max" },
8018
7977
  input: ["text"],
@@ -8031,7 +7990,7 @@ export const MODELS = {
8031
7990
  api: "openai-completions",
8032
7991
  provider: "opencode",
8033
7992
  baseUrl: "https://opencode.ai/zen/v1",
8034
- compat: { "maxTokensField": "max_tokens", "requiresReasoningContentOnAssistantMessages": true, "thinkingFormat": "deepseek" },
7993
+ compat: { "maxTokensField": "max_tokens", "requiresReasoningContentOnAssistantMessages": true },
8035
7994
  reasoning: true,
8036
7995
  thinkingLevelMap: { "minimal": null, "low": null, "medium": null, "high": "high", "xhigh": "max" },
8037
7996
  input: ["text"],
@@ -8050,7 +8009,7 @@ export const MODELS = {
8050
8009
  api: "openai-completions",
8051
8010
  provider: "opencode",
8052
8011
  baseUrl: "https://opencode.ai/zen/v1",
8053
- compat: { "maxTokensField": "max_tokens", "supportsLongCacheRetention": false, "requiresReasoningContentOnAssistantMessages": true, "thinkingFormat": "deepseek" },
8012
+ compat: { "maxTokensField": "max_tokens", "supportsLongCacheRetention": false, "requiresReasoningContentOnAssistantMessages": true },
8054
8013
  reasoning: true,
8055
8014
  thinkingLevelMap: { "minimal": null, "low": null, "medium": null, "high": "high", "xhigh": "max" },
8056
8015
  input: ["text"],
@@ -8660,9 +8619,9 @@ export const MODELS = {
8660
8619
  contextWindow: 1000000,
8661
8620
  maxTokens: 384000,
8662
8621
  },
8663
- "glm-5": {
8664
- id: "glm-5",
8665
- name: "GLM-5",
8622
+ "glm-5.1": {
8623
+ id: "glm-5.1",
8624
+ name: "GLM-5.1",
8666
8625
  api: "openai-completions",
8667
8626
  provider: "opencode-go",
8668
8627
  baseUrl: "https://opencode.ai/zen/go/v1",
@@ -8670,17 +8629,17 @@ export const MODELS = {
8670
8629
  reasoning: true,
8671
8630
  input: ["text"],
8672
8631
  cost: {
8673
- input: 1,
8674
- output: 3.2,
8675
- cacheRead: 0.2,
8632
+ input: 1.4,
8633
+ output: 4.4,
8634
+ cacheRead: 0.26,
8676
8635
  cacheWrite: 0,
8677
8636
  },
8678
8637
  contextWindow: 202752,
8679
8638
  maxTokens: 32768,
8680
8639
  },
8681
- "glm-5.1": {
8682
- id: "glm-5.1",
8683
- name: "GLM-5.1",
8640
+ "glm-5.2": {
8641
+ id: "glm-5.2",
8642
+ name: "GLM-5.2",
8684
8643
  api: "openai-completions",
8685
8644
  provider: "opencode-go",
8686
8645
  baseUrl: "https://opencode.ai/zen/go/v1",
@@ -8693,8 +8652,8 @@ export const MODELS = {
8693
8652
  cacheRead: 0.26,
8694
8653
  cacheWrite: 0,
8695
8654
  },
8696
- contextWindow: 202752,
8697
- maxTokens: 32768,
8655
+ contextWindow: 1000000,
8656
+ maxTokens: 131072,
8698
8657
  },
8699
8658
  "kimi-k2.6": {
8700
8659
  id: "kimi-k2.6",
@@ -10005,8 +9964,8 @@ export const MODELS = {
10005
9964
  cacheRead: 0.06,
10006
9965
  cacheWrite: 0,
10007
9966
  },
10008
- contextWindow: 256000,
10009
- maxTokens: 80000,
9967
+ contextWindow: 262144,
9968
+ maxTokens: 144000,
10010
9969
  },
10011
9970
  "meta-llama/llama-3.1-70b-instruct": {
10012
9971
  id: "meta-llama/llama-3.1-70b-instruct",
@@ -10210,7 +10169,7 @@ export const MODELS = {
10210
10169
  cacheWrite: 0,
10211
10170
  },
10212
10171
  contextWindow: 1048576,
10213
- maxTokens: 512000,
10172
+ maxTokens: 131072,
10214
10173
  },
10215
10174
  "mistralai/codestral-2508": {
10216
10175
  id: "mistralai/codestral-2508",
@@ -10546,7 +10505,7 @@ export const MODELS = {
10546
10505
  cost: {
10547
10506
  input: 0.6,
10548
10507
  output: 2.5,
10549
- cacheRead: 0,
10508
+ cacheRead: 0.6,
10550
10509
  cacheWrite: 0,
10551
10510
  },
10552
10511
  contextWindow: 262144,
@@ -10925,7 +10884,7 @@ export const MODELS = {
10925
10884
  cacheWrite: 0,
10926
10885
  },
10927
10886
  contextWindow: 1047576,
10928
- maxTokens: 32768,
10887
+ maxTokens: 4096,
10929
10888
  },
10930
10889
  "openai/gpt-4.1-nano": {
10931
10890
  id: "openai/gpt-4.1-nano",
@@ -10955,7 +10914,7 @@ export const MODELS = {
10955
10914
  cost: {
10956
10915
  input: 2.5,
10957
10916
  output: 10,
10958
- cacheRead: 0,
10917
+ cacheRead: 1.25,
10959
10918
  cacheWrite: 0,
10960
10919
  },
10961
10920
  contextWindow: 128000,
@@ -11091,11 +11050,11 @@ export const MODELS = {
11091
11050
  cost: {
11092
11051
  input: 0.25,
11093
11052
  output: 2,
11094
- cacheRead: 0.025,
11053
+ cacheRead: 0.03,
11095
11054
  cacheWrite: 0,
11096
11055
  },
11097
11056
  contextWindow: 400000,
11098
- maxTokens: 128000,
11057
+ maxTokens: 4096,
11099
11058
  },
11100
11059
  "openai/gpt-5-nano": {
11101
11060
  id: "openai/gpt-5-nano",
@@ -11159,11 +11118,11 @@ export const MODELS = {
11159
11118
  cost: {
11160
11119
  input: 1.25,
11161
11120
  output: 10,
11162
- cacheRead: 0.13,
11121
+ cacheRead: 0.125,
11163
11122
  cacheWrite: 0,
11164
11123
  },
11165
11124
  contextWindow: 128000,
11166
- maxTokens: 32000,
11125
+ maxTokens: 16384,
11167
11126
  },
11168
11127
  "openai/gpt-5.1-codex": {
11169
11128
  id: "openai/gpt-5.1-codex",
@@ -11250,7 +11209,7 @@ export const MODELS = {
11250
11209
  cacheWrite: 0,
11251
11210
  },
11252
11211
  contextWindow: 128000,
11253
- maxTokens: 16384,
11212
+ maxTokens: 32000,
11254
11213
  },
11255
11214
  "openai/gpt-5.2-codex": {
11256
11215
  id: "openai/gpt-5.2-codex",
@@ -12365,7 +12324,7 @@ export const MODELS = {
12365
12324
  cacheWrite: 0,
12366
12325
  },
12367
12326
  contextWindow: 262144,
12368
- maxTokens: 262144,
12327
+ maxTokens: 65536,
12369
12328
  },
12370
12329
  "qwen/qwen3.5-27b": {
12371
12330
  id: "qwen/qwen3.5-27b",
@@ -12432,8 +12391,8 @@ export const MODELS = {
12432
12391
  cacheRead: 0,
12433
12392
  cacheWrite: 0,
12434
12393
  },
12435
- contextWindow: 262144,
12436
- maxTokens: 262144,
12394
+ contextWindow: 256000,
12395
+ maxTokens: 32768,
12437
12396
  },
12438
12397
  "qwen/qwen3.5-flash-02-23": {
12439
12398
  id: "qwen/qwen3.5-flash-02-23",
@@ -13045,7 +13004,7 @@ export const MODELS = {
13045
13004
  cacheWrite: 0,
13046
13005
  },
13047
13006
  contextWindow: 1048576,
13048
- maxTokens: 262144,
13007
+ maxTokens: 131072,
13049
13008
  },
13050
13009
  "~anthropic/claude-fable-latest": {
13051
13010
  id: "~anthropic/claude-fable-latest",
@@ -17022,8 +16981,9 @@ export const MODELS = {
17022
16981
  api: "openai-completions",
17023
16982
  provider: "zai",
17024
16983
  baseUrl: "https://api.z.ai/api/coding/paas/v4",
17025
- compat: { "supportsDeveloperRole": false, "thinkingFormat": "zai", "zaiToolStream": true },
16984
+ compat: { "supportsDeveloperRole": false, "thinkingFormat": "zai", "supportsReasoningEffort": true, "zaiToolStream": true },
17026
16985
  reasoning: true,
16986
+ thinkingLevelMap: { "minimal": null, "low": "high", "medium": "high", "high": "high", "xhigh": "max" },
17027
16987
  input: ["text"],
17028
16988
  cost: {
17029
16989
  input: 0,
@@ -17132,8 +17092,9 @@ export const MODELS = {
17132
17092
  api: "openai-completions",
17133
17093
  provider: "zai-coding-cn",
17134
17094
  baseUrl: "https://open.bigmodel.cn/api/coding/paas/v4",
17135
- compat: { "supportsDeveloperRole": false, "thinkingFormat": "zai", "zaiToolStream": true },
17095
+ compat: { "supportsDeveloperRole": false, "thinkingFormat": "zai", "supportsReasoningEffort": true, "zaiToolStream": true },
17136
17096
  reasoning: true,
17097
+ thinkingLevelMap: { "minimal": null, "low": "high", "medium": "high", "high": "high", "xhigh": "max" },
17137
17098
  input: ["text"],
17138
17099
  cost: {
17139
17100
  input: 0,