mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-09 02:44:28 +02:00
28 lines
813 B
TypeScript
28 lines
813 B
TypeScript
import {
|
|
applyAgentDefaultModelPrimary,
|
|
resolveAgentModelPrimaryValue,
|
|
} from "openclaw/plugin-sdk/provider-onboard";
|
|
import { OPENCODE_GO_DEFAULT_MODEL_REF } from "./onboard.js";
|
|
|
|
export {
|
|
applyOpencodeGoConfig,
|
|
applyOpencodeGoProviderConfig,
|
|
OPENCODE_GO_DEFAULT_MODEL_REF,
|
|
} from "./onboard.js";
|
|
|
|
export function applyOpencodeGoModelDefault(
|
|
cfg: import("openclaw/plugin-sdk/provider-onboard").OpenClawConfig,
|
|
): {
|
|
next: import("openclaw/plugin-sdk/provider-onboard").OpenClawConfig;
|
|
changed: boolean;
|
|
} {
|
|
const current = resolveAgentModelPrimaryValue(cfg.agents?.defaults?.model);
|
|
if (current === OPENCODE_GO_DEFAULT_MODEL_REF) {
|
|
return { next: cfg, changed: false };
|
|
}
|
|
return {
|
|
next: applyAgentDefaultModelPrimary(cfg, OPENCODE_GO_DEFAULT_MODEL_REF),
|
|
changed: true,
|
|
};
|
|
}
|