Merge pull request #259 from cyhhao/main

fix: adjust OpenCode OpenAI example store placement
This commit is contained in:
Wesley Liddick
2026-01-13 09:30:26 +08:00
committed by GitHub

View File

@@ -525,14 +525,16 @@ function generateOpenCodeConfig(platform: string, baseUrl: string, apiKey: strin
[platform]: { [platform]: {
options: { options: {
baseURL: baseUrl, baseURL: baseUrl,
apiKey, apiKey
...(platform === 'openai' ? { store: false } : {})
} }
} }
} }
const openaiModels = { const openaiModels = {
'gpt-5.2-codex': { 'gpt-5.2-codex': {
name: 'GPT-5.2 Codex', name: 'GPT-5.2 Codex',
options: {
store: false
},
variants: { variants: {
low: {}, low: {},
medium: {}, medium: {},
@@ -574,9 +576,26 @@ function generateOpenCodeConfig(platform: string, baseUrl: string, apiKey: strin
provider[platform].models = openaiModels provider[platform].models = openaiModels
} }
const agent =
platform === 'openai'
? {
build: {
options: {
store: false
}
},
plan: {
options: {
store: false
}
}
}
: undefined
const content = JSON.stringify( const content = JSON.stringify(
{ {
provider, provider,
...(agent ? { agent } : {}),
$schema: 'https://opencode.ai/config.json' $schema: 'https://opencode.ai/config.json'
}, },
null, null,