llm providers - sinrimin/harness-nexus GitHub Wiki
LLM providers & model discovery
Phase 9 W10 ยท design: design-phase-9-w10-llm-providers.md
An LlmProvider is a reusable LLM route: { name, api kind, baseUrl?, credentialName, scope }. The API key is never stored on the provider โ it
lives in the encrypted credential store, referenced by
name, and must be distributable (it gets pushed to machines).
API kinds vs. agent support
Three kinds โ openai-chat, openai-responses, anthropic โ because the
agent tools differ: codex speaks Responses-only, Claude Code needs the
Anthropic flavor, etc. Each agent target accepts only its supported subset
(the machine page filters automatically).
Model discovery
่ทๅๆจกๅ / fetch models (pre-save or per-provider) resolves the credential,
fetches the endpoint's model list, and returns sorted ids/display names.
Failures surface as 502/504 with a clear code. This is the platform's
second deliberate outbound HTTP surface (the skill marketplace is the first):
GET-only, http(s) only, time-boxed, body-capped.
Multi-model
A machine's runtime config takes a default model plus optional extra model ids. What each agent does with the set differs (dsh: a live per-provider catalog; claude-code: an allowlist; others: single model) โ details in Harness runtime management, and the in-chat model picker lists only platform-configured models.