fix(opencode): make the OSS provider usable at all - #420
Open
larsmoan wants to merge 2 commits into
Open
Conversation
Every model in the `databricks-oss` bucket failed on its first request. Two separate fields in the request body reached the gateway's strict validator and each one earned an HTTP 400.
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.
Every model in the
databricks-ossbucket fails on its first request. Two fieldsin the request body reach the gateway's strict validator, and each one earns an
HTTP 400. This is not qwen-specific, and it needs no MCP server to reproduce.
prompt_cache_key. OpenCode stamps this field on every@ai-sdk/openairequest. OpenCode reads the
setCacheKeyopt-out from the provideroptionsonly. I tested a per-model entry against a live gateway, and it does not suppress
the field.
The output cap.
_MODEL_TOKEN_LIMITSknew one family,glm. Every othermodel sent OpenCode's 32000 default. The gateway caps output per model: 25000 for
qwen35-122b-a10b,gpt-oss-120bandgpt-oss-20b, and 8192 forllama-4-maverickandgemma-3-12b. The cap is not discoverable, because themodel-services listing and the serving-endpoints API both omit it. So the table
grows. The Maverick key is the full
llama-4-maverick, because a barellamakeywould pin a 1M context on the 128k Llama 3 endpoints.
Verification
All five OSS models on the test workspace answer. Before this change all five
returned HTTP 400. Each fix alone still fails, so both are needed.