fix: give vLLM-backed OpenCode providers the generation controls they were silently dropping - #4809
Merged
Conversation
… 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_STYLEgains avllm: 'chatTemplate'row. A missing entry is not a missing checkbox:buildAgentGenerationbails on itshasOwnguard and returnsnull, so temperature, top-p andreasoningEffortwent with the toggle. vLLM routes thinking through the chat template exactly as MTPLX and llama.cpp do.vllmBackedmarker —generationControlsFor(the Generation Defaults block) andisOpencodeLocalProvider(the reasoning-effort ladder). Both were written beforevllmBackedexisted; the second one was found by the new test table rather than reported.apiGenerationOptionsgains the same marker. No vLLMapipreset ships, but that guard mirrors the client's, so leaving one half narrower re-creates the bug the moment a record is hand-built.temperature/topP/thinkingvalue. 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.LOCAL_RUNTIMESand fails if a runtime OpenCode can be pointed at has noTHINKING_STYLEentry, so a sixth one cannot land with the same hole.Docs cleanup folded in from the same #4716 review:
dflash2.mdnow points RTX 3090 readers at the container (it linked one way only).batch/vssingle-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.Test plan
cd server && npm test— 32,746 passing. One pre-existing local failure,routes/imageGen.multipart.test.js(a 10sbeforeAllhook timeout, unrelated to this diff); confirmed it fails identically withorigin/main'sserver/andclient/checked out.cd client && npm test— 9,330 passing;npm run lintclean.vllmrow fromTHINKING_STYLEturns theLOCAL_RUNTIMESwalk red, and removingvllmBackedfrom theapiGenerationOptionsguard turns the new runner test red.Closes #4765