Repository navigation
Allow Fireworks and Baseten through OpenCode, with a key per provider - #1942
Merged
Merged
Conversation
…#1883) The proxy's OpenCode provider hosts gain Baseten's inference.baseten.co beside Fireworks' api.fireworks.ai. The Credentials take an [opencode.keys] table of keys by OpenCode provider name, with opencode.api_key kept for any provider without its own, so two OpenCode seats on different providers each get their own key.
Work out the OpenCode Trial's provider once, keep vocabulary to the glossary's, list the OpenCode keys in the Credentials entry and module doc, and rewrap long lines.
This was referenced Nov 10, 2026
Merged
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
OpenCode sessions can now use
fireworks-ai/...andbaseten/...Models inside the sandbox. This applies to Grader panel Graders and to Arms. Each session takes the key for the provider its Model names.proxy allowed_hosts(OpenCode, model) opencode.ai, models.opencode.ai provider_hosts(provider) fireworks-ai -> api.fireworks.ai + baseten -> inference.baseten.coDocs:
docs/guide.md(which regeneratessite/docs/index.html),docs/trial.md, and the Credentials entry inGLOSSARY.md. The hand-written site pages say nothing about OpenCode keys or provider hosts, so none of them needed changing.Evidence
Execution evidence
cargo test --bin thirdshift proxy::tests::an_opencode_fireworkscargo test --bin thirdshift -- sandbox::tests::opencode sandbox::tests::an_opencode --nocaptureran under bwrap, with no skip.anthropic/...Model the singleapi_key. These tests were written together withOpenCodeKeys, so there is no failing run of them before the change.scripts/affected-tests origin/issue-1872npm run docs:check --prefix sitealso exited 0.Visual evidence
No visual evidence is needed: there is no rendered-layout change. The only site change is one regenerated prose paragraph in the user manual.
Merge Danger
Door: two-way
The change only adds to the Credentials format. An existing single
opencode.api_keykeeps working, and nothing is rewritten.Blast Radius: narrow
It affects OpenCode Trials and Graders only. The proxy allows one more host, and only for
baseten/...Models. When a key is missing, the error now names the provider and both places a key can go.Review coverage
Both review axes read every changed file. The one exception is
site/docs/index.html, generated output that both reviewers confirmed as excluded: it comes fromdocs/guide.mdthroughsite/generate-docs.mjs, andnpm run docs:check --prefix siteexited 0.Unaddressed findings
Standards
&str. Declined. The diff extends the existingproxy::opencode_provider→provider_hostspattern (src/proxy.rs:61) without changing its shape. A newtype across the proxy, Credentials and sandbox would be a refactor beyond Allow Fireworks and Baseten through opencode, with a key per provider #1883, and the reviewer rated it low priority.Credentials::read_fromwidened topub(crate)for tests. Declined. The reviewer noted it without objecting, citing codebase-design's "the interface is the test surface". The seam lets the sandbox tests build keys through the real parser (src/resend_key.rs,read_from), not through private fields.Spec
read_fromseam,opencode_keys(), the clearer missing-key error, and the docs. No change was needed: the reviewer judged each one to be in support of "opencode takes an API key per provider instead of one".Security
proxy::opencode_provider, so a session receives only the key for the provider whose hosts the proxy allows. An unknown provider fails before its session starts. No other provider's key enters the sandbox.Closes #1883
Built with claude 2.1.314 · opus · default effort
Security review outcome
No unaddressed introduced findings.