Skip to content

Use config hook#1

Merged
razmser merged 7 commits into
mainfrom
use-config-hook
May 14, 2026
Merged

Use config hook#1
razmser merged 7 commits into
mainfrom
use-config-hook

Conversation

@razmser
Copy link
Copy Markdown
Collaborator

@razmser razmser commented May 14, 2026

Previously we used provider hook to dynamically fetch models, and now we use config hook.
Because of broken model loading logic in provider hook:
anomalyco/opencode#25630

Also, instead of shipping a static model list we intersect hub/api/prices result with the OpenCode managed models.json

razmser added 7 commits May 14, 2026 16:52
Replace static models.json with runtime intersection of models.dev API
and Hub prices endpoint. Fetch model capabilities (limits, reasoning,
tool use, modalities, costs) from models.dev at startup, intersected
with the Hub catalog. Move model population from provider hook into
config hook. Add 10s fetch timeout and xdg-basedir cache for
models.dev data. Support COREINFRA_HUB_BASE_URL env var for custom
endpoints. Delete models.json, scripts/fetch-models.ts, and the
update-models CI workflow.
@razmser razmser merged commit 3ae28d7 into main May 14, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant