Compare commits

..

7 Commits

Author SHA1 Message Date
opencode 31406ccc51 release: v1.18.18 2026-08-13 01:14:49 +00:00
opencode-agent[bot] 14b37df391 chore: update nix node_modules hashes 2026-08-12 22:36:40 +00:00
opencode-agent[bot] 91df883231 fix(opencode): select Kimi prompt by provider (#42161)
Co-authored-by: Aiden Cline <rekram1-node@users.noreply.github.com>
2026-08-12 17:29:03 -05:00
opencode-agent[bot] 6fea419feb fix(groq): pass through reasoning effort (#42166)
Co-authored-by: Aiden Cline <rekram1-node@users.noreply.github.com>
2026-08-12 17:20:23 -05:00
opencode-agent[bot] beeabe2e4b fix(mistral): pass through reasoning effort (#42164)
Co-authored-by: Aiden Cline <rekram1-node@users.noreply.github.com>
2026-08-12 17:20:07 -05:00
opencode-agent[bot] 502310f4df fix(xai): pass through reasoning effort (#42160)
Co-authored-by: Aiden Cline <rekram1-node@users.noreply.github.com>
2026-08-12 17:19:17 -05:00
opencode 37fe5c83dc sync release versions for v1.18.17 2026-08-12 20:25:04 +00:00
40 changed files with 393 additions and 81 deletions
+29 -28
View File
@@ -29,7 +29,7 @@
},
"packages/app": {
"name": "@opencode-ai/app",
"version": "1.18.17",
"version": "1.18.18",
"dependencies": {
"@corvu/drawer": "catalog:",
"@dnd-kit/abstract": "0.5.0",
@@ -96,7 +96,7 @@
},
"packages/cli": {
"name": "@opencode-ai/cli",
"version": "1.18.17",
"version": "1.18.18",
"bin": {
"lildax": "./bin/lildax.cjs",
},
@@ -144,7 +144,7 @@
},
"packages/codemode": {
"name": "@opencode-ai/codemode",
"version": "1.18.17",
"version": "1.18.18",
"dependencies": {
"acorn": "8.15.0",
"effect": "catalog:",
@@ -158,7 +158,7 @@
},
"packages/console/app": {
"name": "@opencode-ai/console-app",
"version": "1.18.17",
"version": "1.18.18",
"dependencies": {
"@cloudflare/vite-plugin": "1.15.2",
"@ibm/plex": "6.4.1",
@@ -194,7 +194,7 @@
},
"packages/console/core": {
"name": "@opencode-ai/console-core",
"version": "1.18.17",
"version": "1.18.18",
"dependencies": {
"@aws-sdk/client-sts": "3.782.0",
"@jsx-email/render": "1.1.1",
@@ -221,7 +221,7 @@
},
"packages/console/function": {
"name": "@opencode-ai/console-function",
"version": "1.18.17",
"version": "1.18.18",
"dependencies": {
"@ai-sdk/anthropic": "3.0.82",
"@ai-sdk/openai": "3.0.48",
@@ -243,7 +243,7 @@
},
"packages/console/mail": {
"name": "@opencode-ai/console-mail",
"version": "1.18.17",
"version": "1.18.18",
"dependencies": {
"@jsx-email/all": "2.2.3",
"@jsx-email/cli": "1.4.3",
@@ -267,7 +267,7 @@
},
"packages/console/support": {
"name": "@opencode-ai/console-support",
"version": "1.18.17",
"version": "1.18.18",
"dependencies": {
"@cloudflare/vite-plugin": "1.15.2",
"@opencode-ai/console-core": "workspace:*",
@@ -287,7 +287,7 @@
},
"packages/core": {
"name": "@opencode-ai/core",
"version": "1.18.17",
"version": "1.18.18",
"bin": {
"opencode": "./bin/opencode",
},
@@ -381,7 +381,7 @@
},
"packages/desktop": {
"name": "@opencode-ai/desktop",
"version": "1.18.17",
"version": "1.18.18",
"dependencies": {
"@zip.js/zip.js": "2.7.62",
"drizzle-orm": "catalog:",
@@ -435,7 +435,7 @@
},
"packages/effect-drizzle-sqlite": {
"name": "@opencode-ai/effect-drizzle-sqlite",
"version": "1.18.17",
"version": "1.18.18",
"dependencies": {
"drizzle-orm": "catalog:",
"effect": "catalog:",
@@ -449,7 +449,7 @@
},
"packages/effect-sqlite-node": {
"name": "@opencode-ai/effect-sqlite-node",
"version": "1.18.17",
"version": "1.18.18",
"dependencies": {
"effect": "catalog:",
},
@@ -461,7 +461,7 @@
},
"packages/enterprise": {
"name": "@opencode-ai/enterprise",
"version": "1.18.17",
"version": "1.18.18",
"dependencies": {
"@hono/standard-validator": "catalog:",
"@opencode-ai/core": "workspace:*",
@@ -493,7 +493,7 @@
},
"packages/function": {
"name": "@opencode-ai/function",
"version": "1.18.17",
"version": "1.18.18",
"dependencies": {
"@octokit/auth-app": "8.0.1",
"@octokit/rest": "catalog:",
@@ -509,7 +509,7 @@
},
"packages/http-recorder": {
"name": "@opencode-ai/http-recorder",
"version": "1.18.17",
"version": "1.18.18",
"dependencies": {
"@effect/platform-node": "4.0.0-beta.83",
"@effect/platform-node-shared": "4.0.0-beta.83",
@@ -540,7 +540,7 @@
},
"packages/llm": {
"name": "@opencode-ai/llm",
"version": "1.18.17",
"version": "1.18.18",
"dependencies": {
"@opencode-ai/schema": "workspace:*",
"@smithy/eventstream-codec": "4.2.14",
@@ -559,7 +559,7 @@
},
"packages/opencode": {
"name": "opencode",
"version": "1.18.17",
"version": "1.18.18",
"bin": {
"opencode": "./bin/opencode",
},
@@ -690,7 +690,7 @@
},
"packages/plugin": {
"name": "@opencode-ai/plugin",
"version": "1.18.17",
"version": "1.18.18",
"dependencies": {
"@ai-sdk/provider": "3.0.8",
"@opencode-ai/sdk": "workspace:*",
@@ -766,7 +766,7 @@
},
"packages/sdk/js": {
"name": "@opencode-ai/sdk",
"version": "1.18.17",
"version": "1.18.18",
"dependencies": {
"cross-spawn": "catalog:",
},
@@ -781,7 +781,7 @@
},
"packages/server": {
"name": "@opencode-ai/server",
"version": "1.18.17",
"version": "1.18.18",
"dependencies": {
"@opencode-ai/core": "workspace:*",
"@opencode-ai/protocol": "workspace:*",
@@ -796,7 +796,7 @@
},
"packages/session-ui": {
"name": "@opencode-ai/session-ui",
"version": "1.18.17",
"version": "1.18.18",
"dependencies": {
"@kobalte/core": "catalog:",
"@opencode-ai/client": "file:../app/vendor/opencode-ai-client-1.17.13-v2.tgz",
@@ -836,7 +836,7 @@
},
"packages/slack": {
"name": "@opencode-ai/slack",
"version": "1.18.17",
"version": "1.18.18",
"dependencies": {
"@opencode-ai/sdk": "workspace:*",
"@slack/bolt": "^3.17.1",
@@ -849,7 +849,7 @@
},
"packages/stats/app": {
"name": "@opencode-ai/stats-app",
"version": "1.18.17",
"version": "1.18.18",
"dependencies": {
"@ibm/plex": "6.4.1",
"@kobalte/core": "catalog:",
@@ -883,7 +883,7 @@
},
"packages/stats/core": {
"name": "@opencode-ai/stats-core",
"version": "1.18.17",
"version": "1.18.18",
"dependencies": {
"@aws-sdk/client-athena": "3.933.0",
"@planetscale/database": "1.19.0",
@@ -902,7 +902,7 @@
},
"packages/stats/server": {
"name": "@opencode-ai/stats-server",
"version": "1.18.17",
"version": "1.18.18",
"dependencies": {
"@aws-sdk/client-firehose": "3.933.0",
"@effect/platform-node": "catalog:",
@@ -944,7 +944,7 @@
},
"packages/tui": {
"name": "@opencode-ai/tui",
"version": "1.18.17",
"version": "1.18.18",
"dependencies": {
"@opencode-ai/core": "workspace:*",
"@opencode-ai/plugin": "workspace:*",
@@ -971,7 +971,7 @@
},
"packages/ui": {
"name": "@opencode-ai/ui",
"version": "1.18.17",
"version": "1.18.18",
"dependencies": {
"@kobalte/core": "catalog:",
"@pierre/diffs": "catalog:",
@@ -1022,7 +1022,7 @@
},
"packages/web": {
"name": "@opencode-ai/web",
"version": "1.18.17",
"version": "1.18.18",
"dependencies": {
"@astrojs/cloudflare": "12.6.3",
"@astrojs/markdown-remark": "6.3.1",
@@ -1075,6 +1075,7 @@
"@silvia-odwyer/photon-node@0.3.4": "patches/@silvia-odwyer%2Fphoton-node@0.3.4.patch",
"@npmcli/agent@4.0.2": "patches/@npmcli%2Fagent@4.0.2.patch",
"solid-js@1.9.10": "patches/solid-js@1.9.10.patch",
"@ai-sdk/groq@3.0.31": "patches/@ai-sdk%2Fgroq@3.0.31.patch",
"@ai-sdk/google@3.0.73": "patches/@ai-sdk%2Fgoogle@3.0.73.patch",
"pacote@21.5.0": "patches/pacote@21.5.0.patch",
"@dnd-kit/dom@0.5.0": "patches/@dnd-kit%2Fdom@0.5.0.patch",
+4 -4
View File
@@ -1,8 +1,8 @@
{
"nodeModules": {
"x86_64-linux": "sha256-uduwrM143NDSc+tXsi4lVVfoMll2a3BDHRUjuO7GB68=",
"aarch64-linux": "sha256-6DUda78XdXY6DP86lIUkweSjys3iG4Y4mo1PiaNuXbg=",
"aarch64-darwin": "sha256-AkJwfLULLZVwwz+XU1QcFUZoIS7oVPCn+n/MXEaxrqE=",
"x86_64-darwin": "sha256-hAxKGdiITTxQ2uujQt6prNjo3NxGAMMeo+9HlMWK6GU="
"x86_64-linux": "sha256-TNwKfqxD83UpZuCKN8FdEWN+CcQUP9CkCQSLGNqR/sA=",
"aarch64-linux": "sha256-qzvOJZzmq2QhlauElw8GwgQnCPHdhexI52L0md5zrxQ=",
"aarch64-darwin": "sha256-ZzoyLayOFfcYUAg35ZbZ2WapxDdd9IUWqy2xkxZH4QM=",
"x86_64-darwin": "sha256-maP/qLeaC3q8VcmNIPyIKlnplxFXJ7ULho3v21/16Mw="
}
}
+2 -1
View File
@@ -159,6 +159,7 @@
"@modelcontextprotocol/sdk@1.29.0": "patches/@modelcontextprotocol%2Fsdk@1.29.0.patch",
"effect@4.0.0-beta.83": "patches/effect@4.0.0-beta.83.patch",
"@tanstack/virtual-core@3.17.3": "patches/@tanstack%2Fvirtual-core@3.17.3.patch",
"@ai-sdk/openai-compatible@2.0.41": "patches/@ai-sdk%2Fopenai-compatible@2.0.41.patch"
"@ai-sdk/openai-compatible@2.0.41": "patches/@ai-sdk%2Fopenai-compatible@2.0.41.patch",
"@ai-sdk/groq@3.0.31": "patches/@ai-sdk%2Fgroq@3.0.31.patch"
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@opencode-ai/app",
"version": "1.18.17",
"version": "1.18.18",
"description": "",
"type": "module",
"exports": {
+1 -1
View File
@@ -1,7 +1,7 @@
{
"$schema": "https://json.schemastore.org/package.json",
"name": "@opencode-ai/cli",
"version": "1.18.17",
"version": "1.18.18",
"type": "module",
"license": "MIT",
"bin": {
+1 -1
View File
@@ -1,7 +1,7 @@
{
"$schema": "https://json.schemastore.org/package.json",
"name": "@opencode-ai/codemode",
"version": "1.18.17",
"version": "1.18.18",
"description": "Effect-native confined code execution over schema-described tools",
"private": true,
"type": "module",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@opencode-ai/console-app",
"version": "1.18.17",
"version": "1.18.18",
"type": "module",
"license": "MIT",
"scripts": {
+1 -1
View File
@@ -1,7 +1,7 @@
{
"$schema": "https://json.schemastore.org/package.json",
"name": "@opencode-ai/console-core",
"version": "1.18.17",
"version": "1.18.18",
"private": true,
"type": "module",
"license": "MIT",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@opencode-ai/console-function",
"version": "1.18.17",
"version": "1.18.18",
"$schema": "https://json.schemastore.org/package.json",
"private": true,
"type": "module",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@opencode-ai/console-mail",
"version": "1.18.17",
"version": "1.18.18",
"dependencies": {
"@jsx-email/all": "2.2.3",
"@jsx-email/cli": "1.4.3",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@opencode-ai/console-support",
"version": "1.18.17",
"version": "1.18.18",
"type": "module",
"license": "MIT",
"scripts": {
+1 -1
View File
@@ -1,6 +1,6 @@
{
"$schema": "https://json.schemastore.org/package.json",
"version": "1.18.17",
"version": "1.18.18",
"name": "@opencode-ai/core",
"type": "module",
"license": "MIT",
+28
View File
@@ -0,0 +1,28 @@
import { createGroq } from "@ai-sdk/groq"
import { expect, test } from "bun:test"
test("Groq passes through unknown reasoning effort", async () => {
let body: Record<string, unknown> | undefined
const mockFetch = Object.assign(
async (_input: Parameters<typeof fetch>[0], init?: RequestInit) => {
body = JSON.parse(String(init?.body))
return Response.json({
id: "response-1",
created: 0,
model: "openai/gpt-oss-120b",
object: "chat.completion",
choices: [{ index: 0, message: { role: "assistant", content: "Hello" }, finish_reason: "stop" }],
usage: { prompt_tokens: 1, completion_tokens: 1, total_tokens: 2 },
})
},
{ preconnect: fetch.preconnect },
)
const model = createGroq({ apiKey: "test", fetch: mockFetch })("openai/gpt-oss-120b")
await model.doGenerate({
prompt: [{ role: "user", content: [{ type: "text", text: "Hello" }] }],
providerOptions: { groq: { reasoningEffort: "custom" } },
})
expect(body?.reasoning_effort).toBe("custom")
})
@@ -27,6 +27,32 @@ test("Mistral sends promptCacheKey as prompt_cache_key", async () => {
expect(body?.prompt_cache_key).toBe("session-123")
})
test("Mistral passes through unknown reasoning effort", async () => {
let body: Record<string, unknown> | undefined
const mockFetch = Object.assign(
async (_input: Parameters<typeof fetch>[0], init?: RequestInit) => {
body = JSON.parse(String(init?.body))
return Response.json({
id: "response-1",
created: 0,
model: "mistral-large-latest",
object: "chat.completion",
choices: [{ index: 0, message: { role: "assistant", content: "Hello" }, finish_reason: "stop" }],
usage: { prompt_tokens: 1, completion_tokens: 1, total_tokens: 2 },
})
},
{ preconnect: fetch.preconnect },
)
const model = createMistral({ apiKey: "test", fetch: mockFetch })("mistral-large-latest")
await model.doGenerate({
prompt: [{ role: "user", content: [{ type: "text", text: "Hello" }] }],
providerOptions: { mistral: { reasoningEffort: "custom" } },
})
expect(body?.reasoning_effort).toBe("custom")
})
test("Mistral round-trips native reasoning in assistant history", async () => {
let body: { messages?: unknown[] } | undefined
const mockFetch = Object.assign(
@@ -30,3 +30,56 @@ test("xAI Responses sends promptCacheKey as prompt_cache_key", async () => {
expect(body?.prompt_cache_key).toBe("session-123")
})
test("xAI Responses passes through xhigh reasoning effort", async () => {
let body: Record<string, unknown> | undefined
const mockFetch = Object.assign(
async (_input: Parameters<typeof fetch>[0], init?: RequestInit) => {
body = JSON.parse(String(init?.body))
return Response.json({
id: "response-1",
created_at: 0,
model: "grok-4",
object: "response",
output: [],
usage: { input_tokens: 1, output_tokens: 0 },
status: "completed",
})
},
{ preconnect: fetch.preconnect },
)
const model = createXai({ apiKey: "test", fetch: mockFetch }).responses("grok-4")
await model.doGenerate({
prompt: [{ role: "user", content: [{ type: "text", text: "Hello" }] }],
providerOptions: { xai: { reasoningEffort: "xhigh" } },
})
expect(body?.reasoning).toEqual({ effort: "xhigh" })
})
test("xAI Chat passes through xhigh reasoning effort", async () => {
let body: Record<string, unknown> | undefined
const mockFetch = Object.assign(
async (_input: Parameters<typeof fetch>[0], init?: RequestInit) => {
body = JSON.parse(String(init?.body))
return Response.json({
id: "chat-1",
created: 0,
model: "grok-4",
object: "chat.completion",
choices: [{ index: 0, message: { role: "assistant", content: "Hello" }, finish_reason: "stop" }],
usage: { prompt_tokens: 1, completion_tokens: 1, total_tokens: 2 },
})
},
{ preconnect: fetch.preconnect },
)
const model = createXai({ apiKey: "test", fetch: mockFetch }).chat("grok-4")
await model.doGenerate({
prompt: [{ role: "user", content: [{ type: "text", text: "Hello" }] }],
providerOptions: { xai: { reasoningEffort: "xhigh" } },
})
expect(body?.reasoning_effort).toBe("xhigh")
})
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@opencode-ai/desktop",
"private": true,
"version": "1.18.17",
"version": "1.18.18",
"type": "module",
"license": "MIT",
"homepage": "https://opencode.ai",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"$schema": "https://json.schemastore.org/package.json",
"version": "1.18.17",
"version": "1.18.18",
"name": "@opencode-ai/effect-drizzle-sqlite",
"type": "module",
"license": "MIT",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"$schema": "https://json.schemastore.org/package.json",
"version": "1.18.17",
"version": "1.18.18",
"name": "@opencode-ai/effect-sqlite-node",
"type": "module",
"license": "MIT",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@opencode-ai/enterprise",
"version": "1.18.17",
"version": "1.18.18",
"private": true,
"type": "module",
"license": "MIT",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@opencode-ai/function",
"version": "1.18.17",
"version": "1.18.18",
"$schema": "https://json.schemastore.org/package.json",
"private": true,
"type": "module",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"$schema": "https://json.schemastore.org/package.json",
"version": "1.18.17",
"version": "1.18.18",
"name": "@opencode-ai/http-recorder",
"description": "Record and replay Effect HTTP client traffic with deterministic cassettes",
"type": "module",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"$schema": "https://json.schemastore.org/package.json",
"version": "1.18.17",
"version": "1.18.18",
"name": "@opencode-ai/llm",
"type": "module",
"license": "MIT",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"$schema": "https://json.schemastore.org/package.json",
"version": "1.18.17",
"version": "1.18.18",
"name": "opencode",
"type": "module",
"license": "MIT",
+5 -1
View File
@@ -40,7 +40,11 @@ export function provider(model: Provider.Model) {
if (model.api.id.includes("gemini-")) return [PROMPT_GEMINI]
if (model.api.id.includes("claude")) return [PROMPT_ANTHROPIC]
if (model.api.id.toLowerCase().includes("trinity")) return [PROMPT_TRINITY]
if (model.api.id.toLowerCase().includes("kimi")) return [PROMPT_KIMI]
if (
model.api.id.toLowerCase().includes("kimi") ||
["kimi-for-coding", "moonshotai", "moonshotai-cn"].includes(model.providerID)
)
return [PROMPT_KIMI]
return [PROMPT_DEFAULT]
}
@@ -102,6 +102,13 @@ describe("session.system", () => {
}
})
test("selects the Kimi prompt for official provider model IDs", () => {
for (const providerID of ["kimi-for-coding", "moonshotai", "moonshotai-cn"]) {
const prompt = SystemPrompt.provider({ providerID, api: { id: "k3" } } as Provider.Model)[0]
expect(prompt).toContain("# Prompt and Tool Use")
}
})
it.effect("skills output is sorted by name and stable across calls", () =>
Effect.gen(function* () {
const prompt = yield* SystemPrompt.Service
+1 -1
View File
@@ -1,7 +1,7 @@
{
"$schema": "https://json.schemastore.org/package.json",
"name": "@opencode-ai/plugin",
"version": "1.18.17",
"version": "1.18.18",
"type": "module",
"license": "MIT",
"scripts": {
+1 -1
View File
@@ -1,7 +1,7 @@
{
"$schema": "https://json.schemastore.org/package.json",
"name": "@opencode-ai/sdk",
"version": "1.18.17",
"version": "1.18.18",
"type": "module",
"license": "MIT",
"scripts": {
+1 -1
View File
@@ -1,7 +1,7 @@
{
"$schema": "https://json.schemastore.org/package.json",
"name": "@opencode-ai/server",
"version": "1.18.17",
"version": "1.18.18",
"private": true,
"type": "module",
"license": "MIT",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@opencode-ai/session-ui",
"version": "1.18.17",
"version": "1.18.18",
"private": true,
"type": "module",
"license": "MIT",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@opencode-ai/slack",
"version": "1.18.17",
"version": "1.18.18",
"type": "module",
"license": "MIT",
"scripts": {
+1 -1
View File
@@ -1,7 +1,7 @@
{
"$schema": "https://json.schemastore.org/package.json",
"name": "@opencode-ai/stats-app",
"version": "1.18.17",
"version": "1.18.18",
"private": true,
"type": "module",
"license": "MIT",
+1 -1
View File
@@ -1,7 +1,7 @@
{
"$schema": "https://json.schemastore.org/package.json",
"name": "@opencode-ai/stats-core",
"version": "1.18.17",
"version": "1.18.18",
"private": true,
"type": "module",
"license": "MIT",
+1 -1
View File
@@ -1,7 +1,7 @@
{
"$schema": "https://json.schemastore.org/package.json",
"name": "@opencode-ai/stats-server",
"version": "1.18.17",
"version": "1.18.18",
"private": true,
"type": "module",
"license": "MIT",
+1 -1
View File
@@ -1,7 +1,7 @@
{
"$schema": "https://json.schemastore.org/package.json",
"name": "@opencode-ai/tui",
"version": "1.18.17",
"version": "1.18.18",
"private": true,
"type": "module",
"license": "MIT",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@opencode-ai/ui",
"version": "1.18.17",
"version": "1.18.18",
"type": "module",
"license": "MIT",
"repository": {
+1 -1
View File
@@ -2,7 +2,7 @@
"name": "@opencode-ai/web",
"type": "module",
"license": "MIT",
"version": "1.18.17",
"version": "1.18.18",
"scripts": {
"dev": "astro dev",
"dev:remote": "VITE_API_URL=https://api.opencode.ai astro dev",
+79
View File
@@ -0,0 +1,79 @@
diff --git a/dist/index.d.mts b/dist/index.d.mts
index 8b23996dcce6c1ad5b17ef59f92196fb97312d79..80be2e52a347042b89da8e502834afd92120877a 100644
--- a/dist/index.d.mts
+++ b/dist/index.d.mts
@@ -10,13 +10,7 @@ declare const groqLanguageModelOptions: z.ZodObject<{
raw: "raw";
hidden: "hidden";
}>>;
- reasoningEffort: z.ZodOptional<z.ZodEnum<{
- none: "none";
- default: "default";
- low: "low";
- medium: "medium";
- high: "high";
- }>>;
+ reasoningEffort: z.ZodOptional<z.ZodString>;
parallelToolCalls: z.ZodOptional<z.ZodBoolean>;
user: z.ZodOptional<z.ZodString>;
structuredOutputs: z.ZodOptional<z.ZodBoolean>;
diff --git a/dist/index.d.ts b/dist/index.d.ts
index 8b23996dcce6c1ad5b17ef59f92196fb97312d79..80be2e52a347042b89da8e502834afd92120877a 100644
--- a/dist/index.d.ts
+++ b/dist/index.d.ts
@@ -10,13 +10,7 @@ declare const groqLanguageModelOptions: z.ZodObject<{
raw: "raw";
hidden: "hidden";
}>>;
- reasoningEffort: z.ZodOptional<z.ZodEnum<{
- none: "none";
- default: "default";
- low: "low";
- medium: "medium";
- high: "high";
- }>>;
+ reasoningEffort: z.ZodOptional<z.ZodString>;
parallelToolCalls: z.ZodOptional<z.ZodBoolean>;
user: z.ZodOptional<z.ZodString>;
structuredOutputs: z.ZodOptional<z.ZodBoolean>;
diff --git a/dist/index.js b/dist/index.js
index 45a104f2e0775761858eac2a82ced64bceba1f5e..f60ac36f4a064d527e8f8881b1d6c58ff69286a3 100644
--- a/dist/index.js
+++ b/dist/index.js
@@ -214,7 +214,7 @@ var groqLanguageModelOptions = import_v4.z.object({
* Specifies the reasoning effort level for model inference.
* @see https://console.groq.com/docs/reasoning#reasoning-effort
*/
- reasoningEffort: import_v4.z.enum(["none", "default", "low", "medium", "high"]).optional(),
+ reasoningEffort: import_v4.z.string().optional(),
/**
* Whether to enable parallel function calling during tool use. Default to true.
*/
diff --git a/dist/index.mjs b/dist/index.mjs
index c644c32235d8fa88c51c0fc6958feb1da4877c96..2c2f81869673eb4633e843d93ff5376abf1e67d0 100644
--- a/dist/index.mjs
+++ b/dist/index.mjs
@@ -203,7 +203,7 @@ var groqLanguageModelOptions = z.object({
* Specifies the reasoning effort level for model inference.
* @see https://console.groq.com/docs/reasoning#reasoning-effort
*/
- reasoningEffort: z.enum(["none", "default", "low", "medium", "high"]).optional(),
+ reasoningEffort: z.string().optional(),
/**
* Whether to enable parallel function calling during tool use. Default to true.
*/
diff --git a/src/groq-chat-options.ts b/src/groq-chat-options.ts
index 3812cdf53308709f166f05c58c5d46a5d8189c8b..af520c5459bd752b3cce03c3b4afbeed31157d90 100644
--- a/src/groq-chat-options.ts
+++ b/src/groq-chat-options.ts
@@ -33,9 +33,7 @@ export const groqLanguageModelOptions = z.object({
* Specifies the reasoning effort level for model inference.
* @see https://console.groq.com/docs/reasoning#reasoning-effort
*/
- reasoningEffort: z
- .enum(['none', 'default', 'low', 'medium', 'high'])
- .optional(),
+ reasoningEffort: z.string().optional(),
/**
* Whether to enable parallel function calling during tool use. Default to true.
+16 -11
View File
@@ -2,10 +2,12 @@ diff --git a/dist/index.d.mts b/dist/index.d.mts
index 1bde0b9f8cbe6771a52c1041095c9dddfe8e5b6c..0ca2ffb2a0c9327aed5ddcf0004500dc8b42569f 100644
--- a/dist/index.d.mts
+++ b/dist/index.d.mts
@@ -14,6 +14,7 @@ declare const mistralLanguageModelOptions: z.ZodObject<{
none: "none";
high: "high";
}>>;
@@ -13,7 +13,5 @@ declare const mistralLanguageModelOptions: z.ZodObject<{
- reasoningEffort: z.ZodOptional<z.ZodEnum<{
- none: "none";
- high: "high";
- }>>;
+ reasoningEffort: z.ZodOptional<z.ZodString>;
+ promptCacheKey: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
type MistralLanguageModelOptions = z.infer<typeof mistralLanguageModelOptions>;
@@ -14,10 +16,12 @@ diff --git a/dist/index.d.ts b/dist/index.d.ts
index 1bde0b9f8cbe6771a52c1041095c9dddfe8e5b6c..0ca2ffb2a0c9327aed5ddcf0004500dc8b42569f 100644
--- a/dist/index.d.ts
+++ b/dist/index.d.ts
@@ -14,6 +14,7 @@ declare const mistralLanguageModelOptions: z.ZodObject<{
none: "none";
high: "high";
}>>;
@@ -13,7 +13,5 @@ declare const mistralLanguageModelOptions: z.ZodObject<{
- reasoningEffort: z.ZodOptional<z.ZodEnum<{
- none: "none";
- high: "high";
- }>>;
+ reasoningEffort: z.ZodOptional<z.ZodString>;
+ promptCacheKey: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
type MistralLanguageModelOptions = z.infer<typeof mistralLanguageModelOptions>;
@@ -69,7 +73,7 @@ index d3f904c12a1d582cc7b9e9a2d30273e1a8505b28..267f34e20ea392b7a85ad5259d72d506
* - `'none'`: Disable reasoning
*/
- reasoningEffort: import_v4.z.enum(["high", "none"]).optional()
+ reasoningEffort: import_v4.z.enum(["high", "none"]).optional(),
+ reasoningEffort: import_v4.z.string().optional(),
+ promptCacheKey: import_v4.z.string().optional()
});
@@ -268,7 +272,7 @@ index d2eff622c1b84a96bdeb4012cb0206a33012a04d..3bff11ddd6136ada45809568828cbc8f
* - `'none'`: Disable reasoning
*/
- reasoningEffort: z.enum(["high", "none"]).optional()
+ reasoningEffort: z.enum(["high", "none"]).optional(),
+ reasoningEffort: z.string().optional(),
+ promptCacheKey: z.string().optional()
});
@@ -655,7 +659,8 @@ index 54b29c08517d348995b6ca093b11160e453d5c8b..de30c3e7d924889339e38b1067cb26e9
@@ -64,6 +64,11 @@ export const mistralLanguageModelOptions = z.object({
* - `'none'`: Disable reasoning
*/
reasoningEffort: z.enum(['high', 'none']).optional(),
- reasoningEffort: z.enum(['high', 'none']).optional(),
+ reasoningEffort: z.string().optional(),
+
+ /**
+ * A stable identifier used to route requests with shared prompt prefixes.
+115 -7
View File
@@ -1,8 +1,33 @@
diff --git a/dist/index.d.mts b/dist/index.d.mts
index 266c5ffdd9ee74ff95908ce90858ee4369d4e4ae..990ef4195bc67b6d25f249e1c81cf51710390f9a 100644
index 266c5ffdd9ee74ff95908ce90858ee4369d4e4ae..6ac6e2873b7681ac632c903694aa38c7b09773fa 100644
--- a/dist/index.d.mts
+++ b/dist/index.d.mts
@@ -78,6 +78,7 @@ declare const xaiLanguageModelResponsesOptions: z.ZodObject<{
@@ -5,12 +5,7 @@ import { FetchFunction } from '@ai-sdk/provider-utils';
type XaiChatModelId = 'grok-4.3' | 'grok-4.20-0309-reasoning' | 'grok-4.20-0309-non-reasoning' | 'grok-4.20-multi-agent-0309' | 'grok-build-0.1' | (string & {});
declare const xaiLanguageModelChatOptions: z.ZodObject<{
- reasoningEffort: z.ZodOptional<z.ZodEnum<{
- none: "none";
- low: "low";
- medium: "medium";
- high: "high";
- }>>;
+ reasoningEffort: z.ZodOptional<z.ZodString>;
logprobs: z.ZodOptional<z.ZodBoolean>;
topLogprobs: z.ZodOptional<z.ZodNumber>;
parallel_function_calling: z.ZodOptional<z.ZodBoolean>;
@@ -68,16 +63,12 @@ type XaiResponsesModelId = 'grok-4.3' | 'grok-4.20-0309-reasoning' | 'grok-4.20-
* @see https://docs.x.ai/docs/api-reference#create-new-response
*/
declare const xaiLanguageModelResponsesOptions: z.ZodObject<{
- reasoningEffort: z.ZodOptional<z.ZodEnum<{
- none: "none";
- low: "low";
- medium: "medium";
- high: "high";
- }>>;
+ reasoningEffort: z.ZodOptional<z.ZodString>;
logprobs: z.ZodOptional<z.ZodBoolean>;
topLogprobs: z.ZodOptional<z.ZodNumber>;
store: z.ZodOptional<z.ZodBoolean>;
previousResponseId: z.ZodOptional<z.ZodString>;
@@ -11,10 +36,35 @@ index 266c5ffdd9ee74ff95908ce90858ee4369d4e4ae..990ef4195bc67b6d25f249e1c81cf517
"file_search_call.results": "file_search_call.results";
}>>>>;
diff --git a/dist/index.d.ts b/dist/index.d.ts
index 266c5ffdd9ee74ff95908ce90858ee4369d4e4ae..990ef4195bc67b6d25f249e1c81cf51710390f9a 100644
index 266c5ffdd9ee74ff95908ce90858ee4369d4e4ae..6ac6e2873b7681ac632c903694aa38c7b09773fa 100644
--- a/dist/index.d.ts
+++ b/dist/index.d.ts
@@ -78,6 +78,7 @@ declare const xaiLanguageModelResponsesOptions: z.ZodObject<{
@@ -5,12 +5,7 @@ import { FetchFunction } from '@ai-sdk/provider-utils';
type XaiChatModelId = 'grok-4.3' | 'grok-4.20-0309-reasoning' | 'grok-4.20-0309-non-reasoning' | 'grok-4.20-multi-agent-0309' | 'grok-build-0.1' | (string & {});
declare const xaiLanguageModelChatOptions: z.ZodObject<{
- reasoningEffort: z.ZodOptional<z.ZodEnum<{
- none: "none";
- low: "low";
- medium: "medium";
- high: "high";
- }>>;
+ reasoningEffort: z.ZodOptional<z.ZodString>;
logprobs: z.ZodOptional<z.ZodBoolean>;
topLogprobs: z.ZodOptional<z.ZodNumber>;
parallel_function_calling: z.ZodOptional<z.ZodBoolean>;
@@ -68,16 +63,12 @@ type XaiResponsesModelId = 'grok-4.3' | 'grok-4.20-0309-reasoning' | 'grok-4.20-
* @see https://docs.x.ai/docs/api-reference#create-new-response
*/
declare const xaiLanguageModelResponsesOptions: z.ZodObject<{
- reasoningEffort: z.ZodOptional<z.ZodEnum<{
- none: "none";
- low: "low";
- medium: "medium";
- high: "high";
- }>>;
+ reasoningEffort: z.ZodOptional<z.ZodString>;
logprobs: z.ZodOptional<z.ZodBoolean>;
topLogprobs: z.ZodOptional<z.ZodNumber>;
store: z.ZodOptional<z.ZodBoolean>;
previousResponseId: z.ZodOptional<z.ZodString>;
@@ -23,9 +73,18 @@ index 266c5ffdd9ee74ff95908ce90858ee4369d4e4ae..990ef4195bc67b6d25f249e1c81cf517
"file_search_call.results": "file_search_call.results";
}>>>>;
diff --git a/dist/index.js b/dist/index.js
index 717b74538f5c8f0d6ab1475ebb2a84a47ccd3950..dd7dbeb3bc307e0d355f4bb4939d06cc8eae7528 100644
index 717b74538f5c8f0d6ab1475ebb2a84a47ccd3950..0fd8f0d1cae951cd24401034a9c1dba762d9fd84 100644
--- a/dist/index.js
+++ b/dist/index.js
@@ -246,7 +246,7 @@ var searchSourceSchema = import_v4.z.discriminatedUnion("type", [
rssSourceSchema
]);
var xaiLanguageModelChatOptions = import_v4.z.object({
- reasoningEffort: import_v4.z.enum(["none", "low", "medium", "high"]).optional(),
+ reasoningEffort: import_v4.z.string().optional(),
logprobs: import_v4.z.boolean().optional(),
topLogprobs: import_v4.z.number().int().min(0).max(8).optional(),
/**
@@ -1119,6 +1119,14 @@ async function convertToXaiResponsesInput({
type: "input_file",
file_url: block.data.toString()
@@ -41,6 +100,15 @@ index 717b74538f5c8f0d6ab1475ebb2a84a47ccd3950..dd7dbeb3bc307e0d355f4bb4939d06cc
} else {
throw new import_provider4.UnsupportedFunctionalityError({
functionality: `file part media type ${block.mediaType} as inline data (xAI Responses requires a URL or a Files API reference for non-image files)`
@@ -1746,7 +1754,7 @@ var xaiLanguageModelResponsesOptions = import_v47.z.object({
* tokens), `medium` and `high` (uses more reasoning tokens). Not all models
* support reasoning effort; see xAI's docs for the values each model accepts.
*/
- reasoningEffort: import_v47.z.enum(["none", "low", "medium", "high"]).optional(),
+ reasoningEffort: import_v47.z.string().optional(),
logprobs: import_v47.z.boolean().optional(),
topLogprobs: import_v47.z.number().int().min(0).max(8).optional(),
/**
@@ -1760,6 +1768,10 @@ var xaiLanguageModelResponsesOptions = import_v47.z.object({
* The ID of the previous response from the model.
*/
@@ -63,9 +131,18 @@ index 717b74538f5c8f0d6ab1475ebb2a84a47ccd3950..dd7dbeb3bc307e0d355f4bb4939d06cc
};
if (xaiTools2 && xaiTools2.length > 0) {
diff --git a/dist/index.mjs b/dist/index.mjs
index a26af109585fc2bd3053b320142aa869c06d36f4..774adaf971b648544317a4fc65d0c56e488d4fc7 100644
index a26af109585fc2bd3053b320142aa869c06d36f4..5faca56477b4e55a87f6f57850731c7d3e1721a5 100644
--- a/dist/index.mjs
+++ b/dist/index.mjs
@@ -230,7 +230,7 @@ var searchSourceSchema = z.discriminatedUnion("type", [
rssSourceSchema
]);
var xaiLanguageModelChatOptions = z.object({
- reasoningEffort: z.enum(["none", "low", "medium", "high"]).optional(),
+ reasoningEffort: z.string().optional(),
logprobs: z.boolean().optional(),
topLogprobs: z.number().int().min(0).max(8).optional(),
/**
@@ -1122,6 +1122,14 @@ async function convertToXaiResponsesInput({
type: "input_file",
file_url: block.data.toString()
@@ -81,6 +158,15 @@ index a26af109585fc2bd3053b320142aa869c06d36f4..774adaf971b648544317a4fc65d0c56e
} else {
throw new UnsupportedFunctionalityError3({
functionality: `file part media type ${block.mediaType} as inline data (xAI Responses requires a URL or a Files API reference for non-image files)`
@@ -1749,7 +1757,7 @@ var xaiLanguageModelResponsesOptions = z7.object({
* tokens), `medium` and `high` (uses more reasoning tokens). Not all models
* support reasoning effort; see xAI's docs for the values each model accepts.
*/
- reasoningEffort: z7.enum(["none", "low", "medium", "high"]).optional(),
+ reasoningEffort: z7.string().optional(),
logprobs: z7.boolean().optional(),
topLogprobs: z7.number().int().min(0).max(8).optional(),
/**
@@ -1763,6 +1771,10 @@ var xaiLanguageModelResponsesOptions = z7.object({
* The ID of the previous response from the model.
*/
@@ -158,9 +244,18 @@ index f90df62eb9a30154388b1390e9f3acc3ccc022bf..00e61cba6cf048ae0045be692f33cb7e
if (xaiTools && xaiTools.length > 0) {
diff --git a/src/responses/xai-responses-options.ts b/src/responses/xai-responses-options.ts
index f8e96c061bf8793a402ababb8cad65bb2ad6aead..15c168892c1e8755453c61d3061e958cfd51ac71 100644
index f8e96c061bf8793a402ababb8cad65bb2ad6aead..2a39a36221ab23ea0000bff1d7854c5bce3f9d74 100644
--- a/src/responses/xai-responses-options.ts
+++ b/src/responses/xai-responses-options.ts
@@ -18,7 +18,7 @@ export const xaiLanguageModelResponsesOptions = z.object({
* tokens), `medium` and `high` (uses more reasoning tokens). Not all models
* support reasoning effort; see xAI's docs for the values each model accepts.
*/
- reasoningEffort: z.enum(['none', 'low', 'medium', 'high']).optional(),
+ reasoningEffort: z.string().optional(),
logprobs: z.boolean().optional(),
topLogprobs: z.number().int().min(0).max(8).optional(),
/**
@@ -32,6 +32,10 @@ export const xaiLanguageModelResponsesOptions = z.object({
* The ID of the previous response from the model.
*/
@@ -172,3 +267,16 @@ index f8e96c061bf8793a402ababb8cad65bb2ad6aead..15c168892c1e8755453c61d3061e958c
/**
* Specify additional output data to include in the model response.
* Example values: 'file_search_call.results'.
diff --git a/src/xai-chat-options.ts b/src/xai-chat-options.ts
index d70a72a9fa01da2c711c291da5ce949efbde60b5..fd6b1ae025388b614f08b620244be553199479ca 100644
--- a/src/xai-chat-options.ts
+++ b/src/xai-chat-options.ts
@@ -51,7 +51,7 @@ const searchSourceSchema = z.discriminatedUnion('type', [
// xai-specific provider options
export const xaiLanguageModelChatOptions = z.object({
- reasoningEffort: z.enum(['none', 'low', 'medium', 'high']).optional(),
+ reasoningEffort: z.string().optional(),
logprobs: z.boolean().optional(),
topLogprobs: z.number().int().min(0).max(8).optional(),
+1 -1
View File
@@ -2,7 +2,7 @@
"name": "opencode",
"displayName": "opencode",
"description": "opencode for VS Code",
"version": "1.18.17",
"version": "1.18.18",
"publisher": "sst-dev",
"repository": {
"type": "git",