refactor(kilocode): route shared model constants through core seam

This commit is contained in:
Vincent Koc
2026-03-22 19:17:54 -07:00
parent 3ad652fa9e
commit 02f8a86e5c
6 changed files with 55 additions and 41 deletions

View File

@@ -1,36 +1,12 @@
export const KILOCODE_BASE_URL = "https://api.kilo.ai/api/gateway/";
export const KILOCODE_DEFAULT_MODEL_ID = "kilo/auto";
export const KILOCODE_DEFAULT_MODEL_REF = `kilocode/${KILOCODE_DEFAULT_MODEL_ID}`;
export const KILOCODE_DEFAULT_MODEL_NAME = "Kilo Auto";
export type KilocodeModelCatalogEntry = {
id: string;
name: string;
reasoning: boolean;
input: Array<"text" | "image">;
contextWindow?: number;
maxTokens?: number;
};
/**
* Static fallback catalog — used by the sync setup path and as a
* fallback when dynamic model discovery from the gateway API fails.
* The full model list is fetched dynamically by {@link discoverKilocodeModels}
* in `src/agents/kilocode-models.ts`.
*/
export const KILOCODE_MODEL_CATALOG: KilocodeModelCatalogEntry[] = [
{
id: KILOCODE_DEFAULT_MODEL_ID,
name: KILOCODE_DEFAULT_MODEL_NAME,
reasoning: true,
input: ["text", "image"],
contextWindow: 1000000,
maxTokens: 128000,
},
];
export const KILOCODE_DEFAULT_CONTEXT_WINDOW = 1000000;
export const KILOCODE_DEFAULT_MAX_TOKENS = 128000;
export const KILOCODE_DEFAULT_COST = {
input: 0,
output: 0,
cacheRead: 0,
cacheWrite: 0,
} as const;
export {
KILOCODE_BASE_URL,
KILOCODE_DEFAULT_CONTEXT_WINDOW,
KILOCODE_DEFAULT_COST,
KILOCODE_DEFAULT_MAX_TOKENS,
KILOCODE_DEFAULT_MODEL_ID,
KILOCODE_DEFAULT_MODEL_NAME,
KILOCODE_DEFAULT_MODEL_REF,
KILOCODE_MODEL_CATALOG,
} from "openclaw/plugin-sdk/provider-models";
export type { KilocodeModelCatalogEntry } from "openclaw/plugin-sdk/provider-models";