diff --git a/deploy/deploy.schema.json b/deploy/deploy.schema.json index 4c4bec53..5782e035 100644 --- a/deploy/deploy.schema.json +++ b/deploy/deploy.schema.json @@ -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_.-]+$" }, diff --git a/deploy/deploy.yaml b/deploy/deploy.yaml index 0a656ae6..6bab5d13 100644 --- a/deploy/deploy.yaml +++ b/deploy/deploy.yaml @@ -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 diff --git a/scripts/gitops-render.mjs b/scripts/gitops-render.mjs index 11c13555..a49aeaac 100644 --- a/scripts/gitops-render.mjs +++ b/scripts/gitops-render.mjs @@ -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",