Provider: include tool-capable models for Chutes
This commit is contained in:
parent
bfe4631723
commit
a2c03ce6ec
@ -312,6 +312,42 @@ function buildChutesProvider(): ProviderConfig {
|
||||
contextWindow: CHUTES_DEFAULT_CONTEXT_WINDOW,
|
||||
maxTokens: CHUTES_DEFAULT_MAX_TOKENS,
|
||||
},
|
||||
{
|
||||
id: "Qwen/Qwen3-235B-A22B-Instruct-2507-TEE",
|
||||
name: "Qwen 3 235B (Tools)",
|
||||
reasoning: false,
|
||||
input: ["text"],
|
||||
cost: CHUTES_DEFAULT_COST,
|
||||
contextWindow: 262144,
|
||||
maxTokens: 4096,
|
||||
},
|
||||
{
|
||||
id: "deepseek-ai/DeepSeek-V3.2-TEE",
|
||||
name: "DeepSeek V3.2 (Tools)",
|
||||
reasoning: false,
|
||||
input: ["text"],
|
||||
cost: CHUTES_DEFAULT_COST,
|
||||
contextWindow: 202752,
|
||||
maxTokens: 4096,
|
||||
},
|
||||
{
|
||||
id: "chutesai/Mistral-Small-3.1-24B-Instruct-2503",
|
||||
name: "Mistral Small 3.1 (Tools)",
|
||||
reasoning: false,
|
||||
input: ["text"],
|
||||
cost: CHUTES_DEFAULT_COST,
|
||||
contextWindow: 131072,
|
||||
maxTokens: 4096,
|
||||
},
|
||||
{
|
||||
id: "NousResearch/Hermes-4-14B",
|
||||
name: "Hermes 4 14B (Tools)",
|
||||
reasoning: false,
|
||||
input: ["text"],
|
||||
cost: CHUTES_DEFAULT_COST,
|
||||
contextWindow: 40960,
|
||||
maxTokens: 4096,
|
||||
},
|
||||
],
|
||||
};
|
||||
}
|
||||
|
||||
@ -216,9 +216,26 @@ export function applyChutesProviderConfig(cfg: ClawdbotConfig): ClawdbotConfig {
|
||||
const providers = { ...cfg.models?.providers };
|
||||
const existingProvider = providers.chutes;
|
||||
const existingModels = Array.isArray(existingProvider?.models) ? existingProvider.models : [];
|
||||
|
||||
const toolCapableModelIds = [
|
||||
"Qwen/Qwen3-235B-A22B-Instruct-2507-TEE",
|
||||
"deepseek-ai/DeepSeek-V3.2-TEE",
|
||||
"chutesai/Mistral-Small-3.1-24B-Instruct-2503",
|
||||
"NousResearch/Hermes-4-14B",
|
||||
];
|
||||
|
||||
const defaultModel = buildChutesModelDefinition();
|
||||
const hasDefaultModel = existingModels.some((model) => model.id === CHUTES_DEFAULT_MODEL_ID);
|
||||
const mergedModels = hasDefaultModel ? existingModels : [...existingModels, defaultModel];
|
||||
const toolModels = toolCapableModelIds.map((id) => buildChutesModelDefinition(id));
|
||||
|
||||
const allChutesModels = [defaultModel, ...toolModels];
|
||||
const mergedModels = [...existingModels];
|
||||
|
||||
for (const model of allChutesModels) {
|
||||
if (!mergedModels.some((m) => m.id === model.id)) {
|
||||
mergedModels.push(model);
|
||||
}
|
||||
}
|
||||
|
||||
const { apiKey: existingApiKey, ...existingProviderRest } = (existingProvider ?? {}) as Record<
|
||||
string,
|
||||
unknown
|
||||
@ -230,7 +247,7 @@ export function applyChutesProviderConfig(cfg: ClawdbotConfig): ClawdbotConfig {
|
||||
baseUrl: CHUTES_BASE_URL,
|
||||
api: "openai-completions",
|
||||
...(normalizedApiKey ? { apiKey: normalizedApiKey } : {}),
|
||||
models: mergedModels.length > 0 ? mergedModels : [defaultModel],
|
||||
models: mergedModels,
|
||||
};
|
||||
|
||||
return {
|
||||
|
||||
@ -116,7 +116,53 @@ export function buildMoonshotModelDefinition(): ModelDefinitionConfig {
|
||||
};
|
||||
}
|
||||
|
||||
export function buildChutesModelDefinition(): ModelDefinitionConfig {
|
||||
export function buildChutesModelDefinition(
|
||||
modelId: string = CHUTES_DEFAULT_MODEL_ID,
|
||||
): ModelDefinitionConfig {
|
||||
if (modelId === "Qwen/Qwen3-235B-A22B-Instruct-2507-TEE") {
|
||||
return {
|
||||
id: modelId,
|
||||
name: "Qwen 3 235B (Tools)",
|
||||
reasoning: false,
|
||||
input: ["text"],
|
||||
cost: CHUTES_DEFAULT_COST,
|
||||
contextWindow: 262144,
|
||||
maxTokens: 4096,
|
||||
};
|
||||
}
|
||||
if (modelId === "deepseek-ai/DeepSeek-V3.2-TEE") {
|
||||
return {
|
||||
id: modelId,
|
||||
name: "DeepSeek V3.2 (Tools)",
|
||||
reasoning: false,
|
||||
input: ["text"],
|
||||
cost: CHUTES_DEFAULT_COST,
|
||||
contextWindow: 202752,
|
||||
maxTokens: 4096,
|
||||
};
|
||||
}
|
||||
if (modelId === "chutesai/Mistral-Small-3.1-24B-Instruct-2503") {
|
||||
return {
|
||||
id: modelId,
|
||||
name: "Mistral Small 3.1 (Tools)",
|
||||
reasoning: false,
|
||||
input: ["text"],
|
||||
cost: CHUTES_DEFAULT_COST,
|
||||
contextWindow: 131072,
|
||||
maxTokens: 4096,
|
||||
};
|
||||
}
|
||||
if (modelId === "NousResearch/Hermes-4-14B") {
|
||||
return {
|
||||
id: modelId,
|
||||
name: "Hermes 4 14B (Tools)",
|
||||
reasoning: false,
|
||||
input: ["text"],
|
||||
cost: CHUTES_DEFAULT_COST,
|
||||
contextWindow: 40960,
|
||||
maxTokens: 4096,
|
||||
};
|
||||
}
|
||||
return {
|
||||
id: CHUTES_DEFAULT_MODEL_ID,
|
||||
name: "GLM 4.6 TEE",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user