## Features - Add Qoder provider: device-flow OAuth, COSY signing, WAF-bypass body encoding, live model catalog, dashboard quota tracker, 11 models (#1372) - Add new models: Claude Opus 4.8 (Claude Code), GPT 5.4 Mini (Codex) ## Fixes - DeepSeek thinking mode: echo `reasoning_content` back on follow-up/tool-call turns so OpenCode-free and custom providers no longer 400 with "reasoning_content must be passed back" (#1543) - Reasoning injector: match deepseek/kimi model ids case-insensitively (covers custom providers using capitalized model names) - OpenCode suggested-models: include free models without the `-free` suffix, e.g. `big-pickle` (#1535) ## Improvements - Codex: trim sunset models, keep gpt-5.5 / gpt-5.4 / gpt-5.3-codex family, add gpt-5.4-mini - volcengine-ark: refresh model list (add DeepSeek-V4-Flash/Pro, drop EOL entries) - Lower stream stall timeout 35s → 30s for faster hang detection
33 lines
878 B
JavaScript
33 lines
878 B
JavaScript
import { BaseExecutor } from "./base.js";
|
|
import { PROVIDERS } from "../config/providers.js";
|
|
import { injectReasoningContent } from "../utils/reasoningContentInjector.js";
|
|
|
|
// Models that use /zen/v1/messages (claude format)
|
|
const MESSAGES_MODELS = new Set();
|
|
|
|
export class OpenCodeExecutor extends BaseExecutor {
|
|
constructor() {
|
|
super("opencode", PROVIDERS.opencode);
|
|
}
|
|
|
|
transformRequest(model, body) {
|
|
return injectReasoningContent({ provider: this.provider, model, body });
|
|
}
|
|
|
|
buildUrl(model) {
|
|
const base = "https://opencode.ai";
|
|
return MESSAGES_MODELS.has(model)
|
|
? `${base}/zen/v1/messages`
|
|
: `${base}/zen/v1/chat/completions`;
|
|
}
|
|
|
|
buildHeaders() {
|
|
return {
|
|
"Content-Type": "application/json",
|
|
"Authorization": "Bearer public",
|
|
"x-opencode-client": "desktop",
|
|
"Accept": "text/event-stream"
|
|
};
|
|
}
|
|
}
|