feat: add multi-provider support via models.dev integration#2
Draft
joshuadavidthomas wants to merge 7 commits into
Draft
feat: add multi-provider support via models.dev integration#2joshuadavidthomas wants to merge 7 commits into
joshuadavidthomas wants to merge 7 commits into
Conversation
be045b8 to
60f04ce
Compare
Fetch provider and model data from models.dev at build time, giving
Open-Inspect access to every provider OpenCode supports (~94 providers,
~2500 models with tool calling). Models appear in the settings UI
grouped by provider; users enable what they want.
How it works:
- prebuild step fetches models.dev/api.json, generates models-dev-data.ts
- isValidModel() accepts any model known to models.dev (not just the
curated built-in list)
- getAllModelOptions() returns built-in models + all models.dev providers
- Settings page, model picker, Slack bot all use getAllModelOptions()
- Falls back to cached data if models.dev is unreachable
Deployer adds API keys via a single Terraform map variable:
provider_api_keys = {
MISTRAL_API_KEY = "sk-..."
GOOGLE_GENERATIVE_AI_API_KEY = "AIza..."
XAI_API_KEY = "xai-..."
}
No sandbox or entrypoint changes — OpenCode handles provider init
from env vars automatically.
60f04ce to
b92f3f6
Compare
- Sort models.dev providers alphabetically in getAllModelOptions() - Add a clickable provider TOC nav at the top of the models settings page - TOC shows enabled count per provider
…ved changes Reverted auto-save back to upstream's explicit save pattern. The save bar now sticks to the bottom of the viewport and only appears when there are unsaved changes.
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.
Fetch provider and model data from models.dev at build time, giving Open-Inspect access to every provider OpenCode supports (~94 providers, ~2500 models with tool calling). Models appear in the settings UI grouped by provider; users enable what they want.
How it works:
Deployer adds API keys via a single Terraform map variable:
provider_api_keys = {
MISTRAL_API_KEY = "sk-..."
GOOGLE_GENERATIVE_AI_API_KEY = "AIza..."
XAI_API_KEY = "xai-..."
}
No sandbox or entrypoint changes — OpenCode handles provider init from env vars automatically.