Changesets · Branches · Tags · Compare
| Changeset | 69c88f2069b9d3f0246bc870c8291a8de33a3e9c1445a0fe54b3d5ec2df75685 |
|---|---|
| Author | Dallin Romney <dallinromney@gmail.com> · 2025-08-18 17:18 -07:00 |
| Committer | GitHub <noreply@github.com> · 2025-08-18 17:18 -07:00 |
| Parents | ad58281a51c9, 19cfb6ec829a |
2 files changed
modified core/llm/toolSupport.test.ts +9 −0
| @@ -280,6 +280,15 @@ | ||
| 280 | 280 | }); |
| 281 | 281 | }); |
| 282 | 282 | |
| 283 | + describe("openrouter", () => { | |
| 284 | + const supportsFn = PROVIDER_TOOL_SUPPORT["openrouter"]; | |
| 285 | + | |
| 286 | + it("should return false for moonshotai/kimi-k2:free model", () => { | |
| 287 | + // This fixes issue #6619 | |
| 288 | + expect(supportsFn("moonshotai/kimi-k2:free")).toBe(false); | |
| 289 | + }); | |
| 290 | + }); | |
| 291 | + | |
| 283 | 292 | describe("edge cases", () => { |
| 284 | 293 | it("should handle empty model names", () => { |
| 285 | 294 | expect(PROVIDER_TOOL_SUPPORT["continue-proxy"]("")).toBe(false); |
modified core/llm/toolSupport.ts +7 −0
| @@ -239,6 +239,13 @@ | ||
| 239 | 239 | }, |
| 240 | 240 | openrouter: (model) => { |
| 241 | 241 | // https://openrouter.ai/models?fmt=cards&supported_parameters=tools |
| 242 | + | |
| 243 | + // Specific free models that don't support tools | |
| 244 | + // Fixes issue #6619 - moonshotai/kimi-k2:free causing 400 errors | |
| 245 | + if (model.toLowerCase() === "moonshotai/kimi-k2:free") { | |
| 246 | + return false; | |
| 247 | + } | |
| 248 | + | |
| 242 | 249 | if ( |
| 243 | 250 | ["vision", "math", "guard", "mistrallite", "mistral-openorca"].some( |
| 244 | 251 | (part) => model.toLowerCase().includes(part), |