You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 0e162e9
Browse filesBrowse the repository at this point in the historyBrowse files
feat(provider): add built-in helexa provider with dynamic model discovery
helexa is a self-hosted, distributed mesh that is not in the public
models.dev catalog and whose model lists, limits, and cost change
frequently. Add a first-class built-in provider so users never hand-edit
opencode.json model tables:
- Seed a minimal helexa provider into the catalog so setting
HELEXA_ENDPOINT (or a provider baseURL) alone activates it — no
opencode.json provider stanza needed. Rides @ai-sdk/openai-compatible.
- Add a custom() loader whose discoverModels() fetches helexa's live
/v1/models at the resolved endpoint and maps per-model token limits and
cost onto opencode models, so context %, compaction headroom, and spend
work with zero per-model config. Mapping verified against a live cortex
gateway's /v1/models.
- Require an explicit endpoint (baseURL option or HELEXA_ENDPOINT); no
hardcoded default until a canonical public router exists.
- Generalize the model-discovery invocation, which was hardcoded to
gitlab, to run for any provider that registers a discoverModels loader.
Refs helexa#61. Builds on helexa#60 (error envelope), anomalyco#48 (usage),
anomalyco#62 (catalog limit/cost).
Co-Authored-By: Claude <[email protected]>
0 commit comments