You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Browse filesBrowse the repository at this point in the historyBrowse files
Nathan Luxford
authored and
Nathan Luxford
committed
Downgrade Lightning model metadata and document reasoning
Kimi K2.5 Lightning and GLM-5 Lightning are speed-optimized models that do not support reasoning, vision, or interleaved reasoning streams. Previously configured with full base-model metadata, this caused model pausing and failed tool calls in OpenCode.
Changes:
- Set reasoning: false for both Lightning variants
- Set attachment: false and text-only modalities
- Removed interleaved field
- Added /v1/models API verification table to README
- Added Lightning limitations and downgrade reasoning to README
Copy file name to clipboardExpand all lines: README.md
+56-3Lines changed: 56 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -188,7 +188,60 @@ That metadata includes:
188
188
-`modalities`
189
189
-`interleaved` when available
190
190
191
-
This was only applied where there was an exact canonical match. The Kimi Lightning and GLM-5 Lightning variants are the exceptions: they keep their own display names and Crof backend `id` values, but reuse the standard family metadata so they behave more like the main Kimi and GLM-5 models in OpenCode.
191
+
This was only applied where there was an exact canonical match. The Lightning variants (Kimi K2.5 Lightning and GLM-5 Lightning) are intentionally downgraded: they keep `tool_call: true` and `temperature: true` but drop `reasoning`, `attachment`, `interleaved`, and multimodal input because they are speed-optimized models that trade off reasoning depth and vision capabilities for faster responses.
192
+
193
+
## Models API Verification
194
+
195
+
Crof's `/v1/models` endpoint returns the following fields for each model:
196
+
197
+
-`id`
198
+
-`context_length`
199
+
-`max_completion_tokens`
200
+
-`pricing`
201
+
202
+
The `/v1/models` response does **not** include capability metadata like `reasoning`, `tool_call`, `modalities`, or `attachment`. Those fields must be inferred and set manually in the OpenCode config.
203
+
204
+
All `limit.context` and `limit.output` values in this config were verified against the live `/v1/models` API response. The following table shows the exact match:
205
+
206
+
| Model | API `context_length`| API `max_completion_tokens`| Config `limit.context`| Config `limit.output`|
The Lightning variants are speed-optimized models. They differ from their base counterparts in important ways:
222
+
223
+
-**No reasoning**: Lightning models do not produce extended reasoning output. They are configured with `reasoning: false` and no `interleaved` field.
224
+
-**No vision**: Lightning models are text-only. They are configured with `attachment: false` and `modalities.input: ["text"]`.
225
+
-**Tool calling**: Lightning models still support tool calling, but may be less reliable than base models for complex agentic workflows.
226
+
-**Lower output limits**: Kimi K2.5 Lightning has a much smaller output limit (32768 vs 262144) which can cause truncation on long responses.
227
+
228
+
If you experience pausing or failed tool calls with Lightning models, switch to the base model (e.g. `moonshotai/kimi-k2.5` instead of `moonshotai/kimi-k2.5:lightning`).
229
+
230
+
### Why Lightning Models Were Downgraded
231
+
232
+
The Lightning entries were initially configured with the same `reasoning: true`, `attachment`, `interleaved`, and multimodal settings as their base models. This caused two problems in practice:
233
+
234
+
1.**Model pausing**: OpenCode expected reasoning output (via `interleaved`) that Lightning models do not produce, causing the stream to hang while waiting for reasoning tokens that never arrive.
235
+
2.**Failed tool calls**: Lightning models struggle with complex tool-calling formats. Marking them as `reasoning: true` made OpenCode expect deeper agentic behavior that the speed-optimized models cannot reliably deliver.
236
+
237
+
The fix was to downgrade Lightning metadata to match reality:
238
+
239
+
-`reasoning: false` — no extended thinking output
240
+
-`attachment: false` — no image or video input
241
+
-`interleaved` removed — no reasoning stream field
242
+
-`modalities.input: ["text"]` — text-only
243
+
244
+
This prevents OpenCode from expecting capabilities the Lightning models do not have, eliminating the pausing and reducing tool call failures.
Kimi Lightning and GLM-5 Lightning were explicitly aligned to the standard Kimi and GLM-5 family metadata to reduce behavior differences while keeping their own backend `id` values and display names.
362
+
The Lightning variants (Kimi K2.5 Lightning and GLM-5 Lightning) are intentionally configured with `reasoning: false`, no `interleaved` field, and text-only modalities because they are speed-optimized models.
310
363
311
364
## Limits
312
365
@@ -361,7 +414,7 @@ Some things were intentionally not added or not assumed.
361
414
362
415
- no API keys are stored in this repo
363
416
- no default `model` is forced in the template
364
-
- no metadata was guessed for Crof-only variants beyond `id`, `name`, and `limit`, except for Kimi Lightning and GLM-5 Lightning which are intentionally aligned to their standard family metadata
417
+
- no metadata was guessed for Crof-only variants beyond `id`, `name`, and `limit`, except for Lightning variants which are intentionally downgraded to speed-optimized settings (no reasoning, no vision, text-only)
365
418
-`structured_output` was not added because it does not appear to be supported on custom provider model entries in the current OpenCode schema
0 commit comments