mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
fix(ai): keep Baseten GLM-5.2 text-only (#8293)
This commit is contained in:
parent
1d6dbf9e3d
commit
22940a62f5
2 changed files with 8 additions and 1 deletions
|
|
@ -1344,6 +1344,8 @@ function processBasetenModels(provider: ModelsDevProvider | undefined): Model<Ap
|
|||
: supportsToggle
|
||||
? toggleThinkingLevelMap
|
||||
: getEffortThinkingLevelMap(reasoningOptions);
|
||||
// Baseten's GLM-5.2 endpoints are text-only despite models.dev reporting image input.
|
||||
const supportsImageInput = !isGlm52 && model.modalities?.input?.includes("image");
|
||||
|
||||
models.push({
|
||||
id: modelId,
|
||||
|
|
@ -1353,7 +1355,7 @@ function processBasetenModels(provider: ModelsDevProvider | undefined): Model<Ap
|
|||
baseUrl,
|
||||
reasoning,
|
||||
...(thinkingLevelMap ? { thinkingLevelMap } : {}),
|
||||
input: model.modalities?.input?.includes("image") ? ["text", "image"] : ["text"],
|
||||
input: supportsImageInput ? ["text", "image"] : ["text"],
|
||||
cost: {
|
||||
input: model.cost?.input || 0,
|
||||
output: model.cost?.output || 0,
|
||||
|
|
|
|||
|
|
@ -54,6 +54,11 @@ describe("Baseten models", () => {
|
|||
});
|
||||
});
|
||||
|
||||
it("keeps both GLM 5.2 endpoints text-only", () => {
|
||||
expect(getModel("baseten", "zai-org/GLM-5.2").input).toEqual(["text"]);
|
||||
expect(getModel("baseten", "zai-org/GLM-5.2-Fast").input).toEqual(["text"]);
|
||||
});
|
||||
|
||||
it("models Kimi K2.6 reasoning as an explicit off/on toggle", async () => {
|
||||
const model = getModel("baseten", "moonshotai/Kimi-K2.6");
|
||||
let payload: Record<string, unknown> | undefined;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue