fix(ai): align Fireworks GLM 5.2 Fast with GLM 5.2

Broaden the Fireworks GLM 5.2 special-case in generate-models.ts from
an exact id match to a glm-5p2 substring match, so the router variant
accounts/fireworks/routers/glm-5p2-fast also uses the OpenAI-compatible
endpoint and thinkingLevelMap instead of falling back to the default
Anthropic Messages config.

closes #6195
This commit is contained in:
Vegard Stikbakke
2026-07-01 10:34:46 +02:00
parent 040f0a5197
commit 844d175eaf
4 changed files with 18 additions and 6 deletions
+10
View File
@@ -48,6 +48,16 @@ describe("Fireworks models", () => {
expect(model?.input).toEqual(["text", "image"]);
});
it("aligns GLM 5.2 Fast with GLM 5.2's OpenAI-compatible config", () => {
const base = getModel("fireworks", "accounts/fireworks/models/glm-5p2");
const fast = getModel("fireworks", "accounts/fireworks/routers/glm-5p2-fast");
expect(fast.api).toBe(base.api);
expect(fast.baseUrl).toBe(base.baseUrl);
expect(fast.compat).toEqual(base.compat);
expect(fast.thinkingLevelMap).toEqual(base.thinkingLevelMap);
});
it("resolves FIREWORKS_API_KEY from the environment", () => {
process.env.FIREWORKS_API_KEY = "test-fireworks-key";