diff options
| author | Adam Malczewski <[email protected]> | 2026-06-27 17:35:39 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-06-27 17:35:39 +0900 |
| commit | 72d08ddffbbf70d73db8d223aac20937f662560f (patch) | |
| tree | 39a3ca55e17b8e26cf34ed045d05a463a7603f96 | |
| parent | 8c4dc78e0b293539f975581cc6e56d4f5557e9f0 (diff) | |
| download | dispatch-72d08ddffbbf70d73db8d223aac20937f662560f.tar.gz dispatch-72d08ddffbbf70d73db8d223aac20937f662560f.zip | |
fix(vision-handoff): omit temperature on vision transcription call (Kimi rejects temperature: 0)
The vision handoff hardcoded temperature: 0 for the transcription sub-call,
but the Moonshot/Kimi vision model only allows temperature: 1 (or omitted),
causing an HTTP 400 "invalid temperature: only 1 is allowed for this model"
that blocked the entire image analysis for non-vision models like GLM 5.2.
Fix: omit temperature entirely so each vision provider uses its own default —
the truly universal, provider-agnostic approach (different providers have
different temperature constraints).
| -rw-r--r-- | packages/vision-handoff/src/service.ts | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/packages/vision-handoff/src/service.ts b/packages/vision-handoff/src/service.ts index 5e6ad70..3f8462a 100644 --- a/packages/vision-handoff/src/service.ts +++ b/packages/vision-handoff/src/service.ts @@ -167,8 +167,11 @@ export function createVisionHandoffService(deps: VisionHandoffDeps): VisionHando }; const providerOpts: ProviderStreamOptions = { model: vision.model, - // Low temperature for faithful transcription. - temperature: 0, + // NOTE: temperature is deliberately OMITTED. Different vision providers + // have different constraints (e.g. Moonshot/Kimi only allows temperature: + // 1; others allow 0–2). Hardcoding any value risks an HTTP 400 from a + // provider that rejects it. Omitting lets each provider use its own + // default — the truly universal, provider-agnostic choice. // A short system prompt keeps the vision model focused on describing. systemPrompt: "You are a vision assistant. Describe images faithfully and thoroughly for a developer who cannot see them.", |
