You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gpt-pilot/extensions/opencode-go/api.ts

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,
};
}