fix: use resolvable opencode apk proxy
This commit is contained in:
@@ -378,6 +378,7 @@
|
|||||||
"model": { "type": "string", "minLength": 1 },
|
"model": { "type": "string", "minLength": 1 },
|
||||||
"smallModel": { "type": "string", "minLength": 1 },
|
"smallModel": { "type": "string", "minLength": 1 },
|
||||||
"baseURL": { "type": "string", "minLength": 1 },
|
"baseURL": { "type": "string", "minLength": 1 },
|
||||||
|
"apkProxyURL": { "type": "string", "minLength": 1 },
|
||||||
"npm": { "type": "string", "minLength": 1 },
|
"npm": { "type": "string", "minLength": 1 },
|
||||||
"apiKeyEnv": { "type": "string", "pattern": "^[A-Z0-9_]+$" },
|
"apiKeyEnv": { "type": "string", "pattern": "^[A-Z0-9_]+$" },
|
||||||
"apiKeySecretRef": { "type": "string", "pattern": "^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$" },
|
"apiKeySecretRef": { "type": "string", "pattern": "^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$" },
|
||||||
|
|||||||
@@ -346,6 +346,7 @@ lanes:
|
|||||||
model: deepseek-v4-flash
|
model: deepseek-v4-flash
|
||||||
smallModel: deepseek-v4-flash
|
smallModel: deepseek-v4-flash
|
||||||
baseURL: https://opencode.ai/zen/go/v1
|
baseURL: https://opencode.ai/zen/go/v1
|
||||||
|
apkProxyURL: http://sub2api-egress-proxy.platform-infra.svc.cluster.local:10808
|
||||||
npm: '@ai-sdk/openai-compatible'
|
npm: '@ai-sdk/openai-compatible'
|
||||||
apiKeyEnv: OPENCODE_DSFLASH_GO_API_KEY
|
apiKeyEnv: OPENCODE_DSFLASH_GO_API_KEY
|
||||||
apiKeySecretRef: hwlab-code-agent-provider/opencode-api-key
|
apiKeySecretRef: hwlab-code-agent-provider/opencode-api-key
|
||||||
|
|||||||
@@ -5657,6 +5657,7 @@ function opencodeRuntimeConfigForProfile(deploy, profile) {
|
|||||||
smallModel,
|
smallModel,
|
||||||
baseURL: providerProxyBaseURL,
|
baseURL: providerProxyBaseURL,
|
||||||
upstreamBaseURL,
|
upstreamBaseURL,
|
||||||
|
apkProxyURL: configString(config.apkProxyURL) || "",
|
||||||
providerProxyPort,
|
providerProxyPort,
|
||||||
providerProxyBasePath,
|
providerProxyBasePath,
|
||||||
npm: configString(config.npm) || "@ai-sdk/openai-compatible",
|
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 configContent = opencodeConfigContent(opencodeConfig);
|
||||||
const configSha256 = createHash("sha256").update(configContent).digest("hex");
|
const configSha256 = createHash("sha256").update(configContent).digest("hex");
|
||||||
const apiKeySecretRef = secretRefObjectForProfile(opencodeConfig.apiKeySecretRef, profile);
|
const apiKeySecretRef = secretRefObjectForProfile(opencodeConfig.apiKeySecretRef, profile);
|
||||||
const opencodeApkProxyUrl = opencodeEgressProxyUrlForProfile(deploy, profile);
|
const opencodeApkProxyUrl = opencodeConfig.apkProxyURL || opencodeEgressProxyUrlForProfile(deploy, profile);
|
||||||
const opencodeApkNoProxy = opencodeEgressNoProxyForProfile(deploy, profile);
|
const opencodeApkNoProxy = opencodeEgressNoProxyForProfile(deploy, profile);
|
||||||
const annotations = {
|
const annotations = {
|
||||||
"hwlab.pikastech.local/rendered-by": "scripts/gitops-render.mjs",
|
"hwlab.pikastech.local/rendered-by": "scripts/gitops-render.mjs",
|
||||||
|
|||||||
Reference in New Issue
Block a user