mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-12 21:53:00 -06:00
d847a62e5d
* fix(opencode): keep API-key onboarding routes usable Amp-Thread-ID: https://ampcode.com/threads/T-019fe94f-6aac-73c9-995b-ced5336f3230 * refactor(opencode): simplify onboarding compatibility Amp-Thread-ID: https://ampcode.com/threads/T-019fe94f-6aac-73c9-995b-ced5336f3230 * fix(opencode): avoid unverified onboarding fallbacks Amp-Thread-ID: https://ampcode.com/threads/T-019fe94f-6aac-73c9-995b-ced5336f3230 * fix(opencode): reconcile dynamic tool deltas Amp-Thread-ID: https://ampcode.com/threads/T-019fe94f-6aac-73c9-995b-ced5336f3230 --------- Co-authored-by: Amp <amp@ampcode.com>
20 lines
605 B
TypeScript
20 lines
605 B
TypeScript
// Opencode setup module handles plugin onboarding behavior.
|
|
import { withAgentModelAliases, type OpenClawConfig } from "openclaw/plugin-sdk/provider-onboard";
|
|
|
|
export const OPENCODE_ZEN_DEFAULT_MODEL_REF = "opencode/claude-opus-5";
|
|
|
|
export function applyOpencodeZenProviderConfig(cfg: OpenClawConfig): OpenClawConfig {
|
|
return {
|
|
...cfg,
|
|
agents: {
|
|
...cfg.agents,
|
|
defaults: {
|
|
...cfg.agents?.defaults,
|
|
models: withAgentModelAliases(cfg.agents?.defaults?.models, [
|
|
{ modelRef: OPENCODE_ZEN_DEFAULT_MODEL_REF, alias: "Opus" },
|
|
]),
|
|
},
|
|
},
|
|
};
|
|
}
|