fix(fireworks): pin Kimi thinking policy off · openclaw/openclaw@003bed0
frankekn
·
2026-05-05
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -71,6 +71,7 @@ Docs: https://docs.openclaw.ai
|
71 | 71 | |
72 | 72 | - Doctor/gateway: report recent supervisor restart handoffs in `openclaw doctor --deep`, using the installed service environment when available so service-managed clean exits are visible in guided diagnostics. Thanks @shakkernerd. |
73 | 73 | - Gateway/status: show recent supervisor restart handoffs in `openclaw gateway status --deep`, including JSON details, so clean service-managed restarts are reported as restart handoffs instead of opaque stopped-service diagnostics. Thanks @shakkernerd. |
| 74 | +- Providers/Fireworks: expose Kimi models as thinking-off-only and keep K2.5/K2.6 requests on `thinking: disabled`, so manual model switches do not send Fireworks-rejected `reasoning*` parameters. Refs #74289. Thanks @frankekn. |
74 | 75 | - Video generation: wait up to 20 minutes for slow fal/MiniMax queue-backed jobs, stop forwarding unsupported Google Veo generated-audio options, and normalize MiniMax `720P` requests to its supported `768P` resolution with the usual override warning/details instead of failing fallback. |
75 | 76 | - Video generation: accept provider-specific aspect-ratio and resolution hints at the tool boundary, normalize `720P` to MiniMax's supported `768P`, and stop sending Google `generateAudio` on Gemini video requests so provider fallback can recover from model-specific parameter differences. Thanks @vincentkoc. |
76 | 77 | - OpenAI/Google Meet: fail realtime voice connection attempts when the socket closes before `session.updated`, avoiding stuck Meet joins waiting on a bridge that never became ready. Thanks @vincentkoc. |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -18,6 +18,7 @@ import {
|
18 | 18 | FIREWORKS_K2_6_MAX_TOKENS, |
19 | 19 | FIREWORKS_K2_6_MODEL_ID, |
20 | 20 | } from "./provider-catalog.js"; |
| 21 | +import { resolveThinkingProfile } from "./provider-policy-api.js"; |
21 | 22 | |
22 | 23 | function createFireworksDefaultRuntimeModel(params: { reasoning: boolean }): ProviderRuntimeModel { |
23 | 24 | return { |
@@ -144,4 +145,42 @@ describe("fireworks provider plugin", () => {
|
144 | 145 | reasoning: false, |
145 | 146 | }); |
146 | 147 | }); |
| 148 | + |
| 149 | +it("exposes off-only thinking policy for Fireworks Kimi models", async () => { |
| 150 | +const provider = await registerSingleProviderPlugin(fireworksPlugin); |
| 151 | + |
| 152 | +expect( |
| 153 | +provider.resolveThinkingProfile?.({ |
| 154 | +provider: "fireworks", |
| 155 | +modelId: "accounts/fireworks/routers/kimi-k2p5-turbo", |
| 156 | +}), |
| 157 | +).toEqual({ |
| 158 | +levels: [{ id: "off" }], |
| 159 | +defaultLevel: "off", |
| 160 | +}); |
| 161 | +expect( |
| 162 | +provider.resolveThinkingProfile?.({ |
| 163 | +provider: "fireworks", |
| 164 | +modelId: FIREWORKS_K2_6_MODEL_ID, |
| 165 | +}), |
| 166 | +).toEqual({ |
| 167 | +levels: [{ id: "off" }], |
| 168 | +defaultLevel: "off", |
| 169 | +}); |
| 170 | +expect( |
| 171 | +provider.resolveThinkingProfile?.({ |
| 172 | +provider: "fireworks", |
| 173 | +modelId: "accounts/fireworks/models/qwen3.6-plus", |
| 174 | +}), |
| 175 | +).toBeUndefined(); |
| 176 | +expect(resolveThinkingProfile({ modelId: FIREWORKS_K2_6_MODEL_ID })).toEqual({ |
| 177 | +levels: [{ id: "off" }], |
| 178 | +defaultLevel: "off", |
| 179 | +}); |
| 180 | +expect( |
| 181 | +resolveThinkingProfile({ |
| 182 | +modelId: "accounts/fireworks/models/qwen3.6-plus", |
| 183 | +}), |
| 184 | +).toBeUndefined(); |
| 185 | +}); |
147 | 186 | }); |
| Original file line number | Diff line number | Diff line change |
|---|
@@ -16,6 +16,7 @@ import {
|
16 | 16 | FIREWORKS_DEFAULT_MODEL_ID, |
17 | 17 | } from "./provider-catalog.js"; |
18 | 18 | import { wrapFireworksProviderStream } from "./stream.js"; |
| 19 | +import { resolveFireworksThinkingProfile } from "./thinking-policy.js"; |
19 | 20 | |
20 | 21 | const PROVIDER_ID = "fireworks"; |
21 | 22 | function resolveFireworksDynamicModel(ctx: ProviderResolveDynamicModelContext) { |
@@ -77,6 +78,7 @@ export default defineSingleProviderPluginEntry({
|
77 | 78 | }, |
78 | 79 | ...OPENAI_COMPATIBLE_REPLAY_HOOKS, |
79 | 80 | wrapStreamFn: wrapFireworksProviderStream, |
| 81 | +resolveThinkingProfile: ({ modelId }) => resolveFireworksThinkingProfile(modelId), |
80 | 82 | resolveDynamicModel: (ctx) => resolveFireworksDynamicModel(ctx), |
81 | 83 | isModernModelRef: () => true, |
82 | 84 | }, |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +import { resolveFireworksThinkingProfile } from "./thinking-policy.js"; |
| 2 | + |
| 3 | +export function resolveThinkingProfile(params: { |
| 4 | +provider?: string; |
| 5 | +modelId: string; |
| 6 | +}): ReturnType<typeof resolveFireworksThinkingProfile> { |
| 7 | +return resolveFireworksThinkingProfile(params.modelId); |
| 8 | +} |
| Original file line number | Diff line number | Diff line change |
|---|
@@ -74,7 +74,7 @@ describe("createFireworksKimiThinkingDisabledWrapper", () => {
|
74 | 74 | }); |
75 | 75 | |
76 | 76 | it("strips reasoning fields when disabling Fireworks Kimi thinking", () => { |
77 | | -const payload = capturePayload({ |
| 77 | +const k2p5Payload = capturePayload({ |
78 | 78 | provider: "fireworks", |
79 | 79 | api: "openai-completions", |
80 | 80 | modelId: "accounts/fireworks/models/kimi-k2p5", |
@@ -84,8 +84,19 @@ describe("createFireworksKimiThinkingDisabledWrapper", () => {
|
84 | 84 | reasoningEffort: "low", |
85 | 85 | }, |
86 | 86 | }); |
| 87 | +const k2p6Payload = capturePayload({ |
| 88 | +provider: "fireworks", |
| 89 | +api: "openai-completions", |
| 90 | +modelId: "accounts/fireworks/models/kimi-k2p6", |
| 91 | +initialPayload: { |
| 92 | +reasoning_effort: "low", |
| 93 | +reasoning: { effort: "low" }, |
| 94 | +reasoningEffort: "low", |
| 95 | +}, |
| 96 | +}); |
87 | 97 | |
88 | | -expect(payload).toEqual({ thinking: { type: "disabled" } }); |
| 98 | +expect(k2p5Payload).toEqual({ thinking: { type: "disabled" } }); |
| 99 | +expect(k2p6Payload).toEqual({ thinking: { type: "disabled" } }); |
89 | 100 | }); |
90 | 101 | |
91 | 102 | it("passes sanitized payloads to caller onPayload hooks", () => { |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +import type { ProviderThinkingProfile } from "openclaw/plugin-sdk/plugin-entry"; |
| 2 | +import { isFireworksKimiModelId } from "./model-id.js"; |
| 3 | + |
| 4 | +const FIREWORKS_KIMI_THINKING_PROFILE = { |
| 5 | +levels: [{ id: "off" }], |
| 6 | +defaultLevel: "off", |
| 7 | +} as const satisfies ProviderThinkingProfile; |
| 8 | + |
| 9 | +export function resolveFireworksThinkingProfile( |
| 10 | +modelId: string, |
| 11 | +): ProviderThinkingProfile | undefined { |
| 12 | +if (!isFireworksKimiModelId(modelId)) { |
| 13 | +return undefined; |
| 14 | +} |
| 15 | + |
| 16 | +return FIREWORKS_KIMI_THINKING_PROFILE; |
| 17 | +} |
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。