Skip to content

llm providers

sinrimin edited this page Sep 18, 2026 · 1 revision

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.

Clone this wiki locally