Conversation
- Targets accept an optional apiKey, sent as a Bearer token when probing
and on chat requests (via per-model headers). {env:VAR} works.
- Add Custom Target is now an oauth/auto method so it runs from both
/connect and `opencode auth login`, asks for an optional key and which
models to list, and no longer needs the dummy API key prompt. The
target is saved in callback() because saving config restarts instances.
- Saving a target only patches that target, so other targets keep their
{env:VAR} references.
- llama-swap: includeUnloaded lists every configured model using
/v1/models metadata without loading them.
- New openai kind: fallback for any server with a /v1/models listing.
- Probe failures for configured targets are logged, with a clear
message for 401/403.
- Update @opencode-ai/plugin and @opencode-ai/sdk to 1.18.31.
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.
Adds API key support so the plugin works with servers that need auth, like a hosted llama-swap with
apiKeysset.apiKey({env:VAR}works). It's sent as a Bearer token when probing and on chat requests.oauth/automethod. That's the only type opencode runs from both/connectandopencode auth login, so it works in the TUI now and the dummy "enter none" key prompt is gone. The key prompt is optional, and there's a choice of which models to list.includeUnloadedlists every model using/v1/modelsmetadata, without loading them. The default is still loaded-only.openaikind as a fallback for any server with a/v1/modelslisting.{env:VAR}references.@opencode-ai/pluginand@opencode-ai/sdkto 1.18.31.Tested with unit tests and against a keyed llama-swap in opencode 1.18.31. I haven't run the Docker provider suite locally.