mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-19 22:10:51 +00:00
31 lines
842 B
TypeScript
31 lines
842 B
TypeScript
import { OPENCODE_ZEN_DEFAULT_MODEL_REF } from "openclaw/plugin-sdk/provider-models";
|
|
import {
|
|
applyAgentDefaultModelPrimary,
|
|
withAgentModelAliases,
|
|
type OpenClawConfig,
|
|
} from "openclaw/plugin-sdk/provider-onboard";
|
|
|
|
export { OPENCODE_ZEN_DEFAULT_MODEL_REF };
|
|
|
|
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" },
|
|
]),
|
|
},
|
|
},
|
|
};
|
|
}
|
|
|
|
export function applyOpencodeZenConfig(cfg: OpenClawConfig): OpenClawConfig {
|
|
return applyAgentDefaultModelPrimary(
|
|
applyOpencodeZenProviderConfig(cfg),
|
|
OPENCODE_ZEN_DEFAULT_MODEL_REF,
|
|
);
|
|
}
|