fix: disable opencode dsflash reasoning by default
This commit is contained in:
@@ -5645,6 +5645,8 @@ function opencodeRuntimeConfigForProfile(deploy, profile) {
|
||||
const apiKeyEnv = configString(config.apiKeyEnv) || opencodeApiKeyEnvName(providerId);
|
||||
const contextLimit = opencodePositiveInteger(config.contextLimit, 1000000, `deploy.lanes.${profile}.opencode.contextLimit`);
|
||||
const outputLimit = opencodePositiveInteger(config.outputLimit, 384000, `deploy.lanes.${profile}.opencode.outputLimit`);
|
||||
const reasoning = opencodeConfigBoolean(config.reasoning, false, `deploy.lanes.${profile}.opencode.reasoning`);
|
||||
const toolCall = opencodeConfigBoolean(config.toolCall, true, `deploy.lanes.${profile}.opencode.toolCall`);
|
||||
const upstreamBaseURL = configString(config.upstreamBaseURL) || configString(config.baseURL) || "https://opencode.ai/zen/go/v1";
|
||||
const providerProxyPort = opencodePositiveInteger(config.providerProxyPort, 4097, `deploy.lanes.${profile}.opencode.providerProxyPort`);
|
||||
const providerProxyBasePath = configString(config.providerProxyBasePath) || "/v1";
|
||||
@@ -5665,6 +5667,8 @@ function opencodeRuntimeConfigForProfile(deploy, profile) {
|
||||
apiKeySecretRef: configString(config.apiKeySecretRef) || "hwlab-code-agent-provider/opencode-api-key",
|
||||
contextLimit,
|
||||
outputLimit,
|
||||
reasoning,
|
||||
toolCall,
|
||||
agentrunSecretNamespace: configString(config.agentrunSecretNamespace) || "agentrun-v02",
|
||||
agentrunSecretName: configString(config.agentrunSecretName) || `agentrun-v01-provider-${providerProfile}`,
|
||||
agentrunSecretKeys: Array.isArray(config.agentrunSecretKeys) && config.agentrunSecretKeys.length > 0
|
||||
@@ -5679,6 +5683,12 @@ function opencodePositiveInteger(value, fallback, label) {
|
||||
return value;
|
||||
}
|
||||
|
||||
function opencodeConfigBoolean(value, fallback, label) {
|
||||
if (value === undefined || value === null) return fallback;
|
||||
assert.equal(typeof value, "boolean", `${label} must be a boolean`);
|
||||
return value;
|
||||
}
|
||||
|
||||
function opencodeEgressProxyUrlForProfile(deploy, profile) {
|
||||
const proxy = deploy?.lanes?.[profile]?.gitMirror?.egressProxy;
|
||||
if (!proxy || proxy.required === false) return "";
|
||||
@@ -5723,8 +5733,8 @@ function opencodeConfigContent(config) {
|
||||
models: {
|
||||
[config.model]: {
|
||||
name: config.model,
|
||||
reasoning: true,
|
||||
tool_call: true,
|
||||
reasoning: config.reasoning,
|
||||
tool_call: config.toolCall,
|
||||
limit: {
|
||||
context: config.contextLimit,
|
||||
output: config.outputLimit
|
||||
|
||||
@@ -774,6 +774,8 @@ test("v03 render includes D518 secret-plane smoke on D518 gitops root", async ()
|
||||
assert.equal(opencodeConfig.provider["dsflash-go"].npm, "@ai-sdk/openai-compatible");
|
||||
assert.equal(opencodeConfig.provider["dsflash-go"].options.baseURL, "http://127.0.0.1:4097/v1");
|
||||
assert.equal(opencodeConfig.provider["dsflash-go"].options.apiKey, "{env:OPENCODE_DSFLASH_GO_API_KEY}");
|
||||
assert.equal(opencodeConfig.provider["dsflash-go"].models["deepseek-v4-flash"].reasoning, false);
|
||||
assert.equal(opencodeConfig.provider["dsflash-go"].models["deepseek-v4-flash"].tool_call, true);
|
||||
assert.deepEqual(opencodeConfig.provider["dsflash-go"].models["deepseek-v4-flash"].limit, { context: 1000000, output: 384000 });
|
||||
const providerProxy = collectContainersFromItem(opencodeDeployment).find((container) => container.name === "opencode-provider-proxy");
|
||||
assert.ok(providerProxy, "expected provider proxy sidecar");
|
||||
|
||||
Reference in New Issue
Block a user