Skip to content

fix: give vLLM-backed OpenCode providers the generation controls they were silently dropping - #4809

Merged
atomantic merged 2 commits into
mainfrom
claim/issue-4765
Aug 22, 2026
Merged

fix: give vLLM-backed OpenCode providers the generation controls they were silently dropping#4809
atomantic merged 2 commits into
mainfrom
claim/issue-4765

Conversation

@atomantic

Copy link
Copy Markdown
Owner

Summary

The seeded OpenCode vLLM providers were the one local OpenAI-compatible runtime whose generation controls did nothing — temperature, top-p, thinking mode and reasoning effort were all silently discarded, and the editor rendered no controls to set in the first place.

  • THINKING_STYLE gains a vllm: 'chatTemplate' row. A missing entry is not a missing checkbox: buildAgentGeneration bails on its hasOwn guard and returns null, so temperature, top-p and reasoningEffort went with the toggle. vLLM routes thinking through the chat template exactly as MTPLX and llama.cpp do.
  • The client mirrors gain the vllmBacked markergenerationControlsFor (the Generation Defaults block) and isOpencodeLocalProvider (the reasoning-effort ladder). Both were written before vllmBacked existed; the second one was found by the new test table rather than reported.
  • apiGenerationOptions gains the same marker. No vLLM api preset ships, but that guard mirrors the client's, so leaving one half narrower re-creates the bug the moment a record is hand-built.
  • No provider seed gains a temperature / topP / thinking value. Unset stays unset — an unset control means the container keeps its own chat-template default, which is not the same as being pinned. What was missing is the capability, not a default.
  • A new guard walks LOCAL_RUNTIMES and fails if a runtime OpenCode can be pointed at has no THINKING_STYLE entry, so a sixth one cannot land with the same hole.

Docs cleanup folded in from the same #4716 review:

  • dflash2.md now points RTX 3090 readers at the container (it linked one way only).
  • The bring-up record regains the upstream source links, the batch/ vs single-user/ profile comparison with its context trade-offs, and the cross-links to the sibling research notes — all lost when the doc was rewritten in place.
  • The feature doc tells operators to set thinking off + temperature ~0.7 on the provider card, and why both ship unset.

Test plan

  • cd server && npm test — 32,746 passing. One pre-existing local failure, routes/imageGen.multipart.test.js (a 10s beforeAll hook timeout, unrelated to this diff); confirmed it fails identically with origin/main's server/ and client/ checked out.
  • cd client && npm test — 9,330 passing; npm run lint clean.
  • Bypass-probed both new guards: removing the vllm row from THINKING_STYLE turns the LOCAL_RUNTIMES walk red, and removing vllmBacked from the apiGenerationOptions guard turns the new runner test red.

Closes #4765

… were silently dropping (#4765)

The seeded OpenCode vLLM presets discarded temperature, top-p, thinking mode
and reasoning effort entirely. THINKING_STYLE had no `vllm` row, so
buildAgentGeneration bailed on its hasOwn guard and emitted no agent.build block
at all — not just the toggle it gates. The client mirrors missed the same marker,
so the editor rendered no Generation Defaults block and no effort picker to set.

vLLM takes the toggle through the chat template exactly as MTPLX and llama.cpp
do. Nothing is seeded onto the provider records: unset stays unset, so the
container keeps its own defaults until an operator pins one. That matters because
the documented posture for tool-calling agent work on this preset is
enable_thinking: false + temperature 0.7, and until now there was no way to reach
it from PortOS.

A new guard walks LOCAL_RUNTIMES and fails if a runtime OpenCode can be pointed
at has no THINKING_STYLE entry, so a sixth one cannot land with the same hole.

Also folds in docs cleanup from the #4716 review: dflash2.md now points RTX 3090
readers at the container, and the bring-up record regains the upstream source
links and the batch/ vs single-user/ profile trade-offs lost when it was
rewritten in place.
…eneration options (#4765)

apiGenerationOptions guards on the local backend markers the same way
THINKING_STYLE keys the OpenCode path, and it was missing vllmBacked — so an
endpoint record carrying the marker would have had its temperature, top_p and
thinking toggle dropped exactly as the OpenCode wrappers did. No vLLM api preset
ships today, but generationControlsFor on the client mirrors both sides and now
offers the controls for vLLM, so leaving one half narrower re-creates the bug
the moment a record is hand-built.
@atomantic
atomantic merged commit 1110aa6 into main Aug 22, 2026
7 checks passed
@atomantic
atomantic deleted the claim/issue-4765 branch August 22, 2026 03:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

vLLM-backed OpenCode providers silently drop every generation control

1 participant