mirror of
https://github.com/hanzoai/bot.git
synced 2026-10-30 17:24:26 +00:00
The automated rebrand sed script replaced "OpenClaw" with "Hanzo Bot" (with space) instead of "HanzoBot" in 8,315 TypeScript identifier occurrences across 1,632 files. This fixes all broken class names, type names, function names, and variable names. Co-authored-by: Hanzo Dev <[email protected]>
41 lines
1.1 KiB
TypeScript
41 lines
1.1 KiB
TypeScript
import { OPENCODE_GO_DEFAULT_MODEL_REF } from "openclaw/plugin-sdk/provider-models";
|
|
import {
|
|
applyAgentDefaultModelPrimary,
|
|
withAgentModelAliases,
|
|
type HanzoBotConfig,
|
|
} from "openclaw/plugin-sdk/provider-onboard";
|
|
|
|
export { OPENCODE_GO_DEFAULT_MODEL_REF };
|
|
|
|
const OPENCODE_GO_ALIAS_DEFAULTS: Record<string, string> = {
|
|
"opencode-go/kimi-k2.5": "Kimi",
|
|
"opencode-go/glm-5": "GLM",
|
|
"opencode-go/minimax-m2.5": "MiniMax",
|
|
};
|
|
|
|
export function applyOpencodeGoProviderConfig(cfg: HanzoBotConfig): HanzoBotConfig {
|
|
return {
|
|
...cfg,
|
|
agents: {
|
|
...cfg.agents,
|
|
defaults: {
|
|
...cfg.agents?.defaults,
|
|
models: withAgentModelAliases(
|
|
cfg.agents?.defaults?.models,
|
|
Object.entries(OPENCODE_GO_ALIAS_DEFAULTS).map(([modelRef, alias]) => ({
|
|
modelRef,
|
|
alias,
|
|
})),
|
|
),
|
|
},
|
|
},
|
|
};
|
|
}
|
|
|
|
export function applyOpencodeGoConfig(cfg: HanzoBotConfig): HanzoBotConfig {
|
|
return applyAgentDefaultModelPrimary(
|
|
applyOpencodeGoProviderConfig(cfg),
|
|
OPENCODE_GO_DEFAULT_MODEL_REF,
|
|
);
|
|
}
|