fix: use resolvable opencode apk proxy

This commit is contained in:
UniDesk Codex
2026-06-30 11:44:16 +08:00
parent 64a377d0f0
commit 2e7380ea2d
3 changed files with 4 additions and 1 deletions
+1
View File
@@ -378,6 +378,7 @@
"model": { "type": "string", "minLength": 1 },
"smallModel": { "type": "string", "minLength": 1 },
"baseURL": { "type": "string", "minLength": 1 },
"apkProxyURL": { "type": "string", "minLength": 1 },
"npm": { "type": "string", "minLength": 1 },
"apiKeyEnv": { "type": "string", "pattern": "^[A-Z0-9_]+$" },
"apiKeySecretRef": { "type": "string", "pattern": "^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$" },
+1
View File
@@ -346,6 +346,7 @@ lanes:
model: deepseek-v4-flash
smallModel: deepseek-v4-flash
baseURL: https://opencode.ai/zen/go/v1
apkProxyURL: http://sub2api-egress-proxy.platform-infra.svc.cluster.local:10808
npm: '@ai-sdk/openai-compatible'
apiKeyEnv: OPENCODE_DSFLASH_GO_API_KEY
apiKeySecretRef: hwlab-code-agent-provider/opencode-api-key
+2 -1
View File
@@ -5657,6 +5657,7 @@ function opencodeRuntimeConfigForProfile(deploy, profile) {
smallModel,
baseURL: providerProxyBaseURL,
upstreamBaseURL,
apkProxyURL: configString(config.apkProxyURL) || "",
providerProxyPort,
providerProxyBasePath,
npm: configString(config.npm) || "@ai-sdk/openai-compatible",
@@ -5763,7 +5764,7 @@ function opencodeServerManifest({ profile = "v03", source, deploy = null, catalo
const configContent = opencodeConfigContent(opencodeConfig);
const configSha256 = createHash("sha256").update(configContent).digest("hex");
const apiKeySecretRef = secretRefObjectForProfile(opencodeConfig.apiKeySecretRef, profile);
const opencodeApkProxyUrl = opencodeEgressProxyUrlForProfile(deploy, profile);
const opencodeApkProxyUrl = opencodeConfig.apkProxyURL || opencodeEgressProxyUrlForProfile(deploy, profile);
const opencodeApkNoProxy = opencodeEgressNoProxyForProfile(deploy, profile);
const annotations = {
"hwlab.pikastech.local/rendered-by": "scripts/gitops-render.mjs",