発売記念価格€100 (税別)。通常価格は€200 (税別)。100 €でYardを購入 (税別)

モデルとプロバイダー

OpenCodeのモデル検出と認証。

更新 · 2026年11月技術リファレンス · 英語
技術リファレンスは英語で提供しています。 技術内容とコマンド名は英語の原文を保持しています。

Technical reference synchronized with Yard’s source. File names and development commands refer to the native app repository.

Implemented on 2026-11-08. Catalogue discovery, exact model routing and the observed authentication flow are implemented and covered by isolated tests. HD011's successful live free-model response remains pending: the single real inference attempt was rejected by the provider's free quota with HTTP 429. Copilot has not been verified with a real account; its executable fake-account and interactive PTY checks are described below.

CLI contracts checked against actual tools

The supported contracts were inspected with real OpenCode 1.19.5 and 2.0.32 executables and clean XDG configuration/data/cache/state. Help inspection and catalogue queries do not authenticate an account or invoke a model. Yard checks a successful supported semantic version before choosing the command family.

Operation OpenCode 1.19.5 OpenCode 2.0.32
Inventory models --verbose api --standalone GET /api/model
Response shape A provider/model line followed by its JSON metadata JSON object with a data array of model metadata
Selected invocation run --format json --agent build --model provider/model PROMPT Same command with --standalone after run
Plan invocation --agent plan --agent plan, retaining --standalone
Copilot connect auth login --provider github-copilot auth login github-copilot --standalone
Copilot disconnect auth logout github-copilot auth logout github-copilot --standalone

V1's positional login argument is a provider URL, so Yard supplies --provider; the logout target is positional. V2 can select an existing Copilot credential interactively when its credential argument is omitted. Yard leaves that account selection in the official Terminal flow. V2 inventory and invocation use private standalone execution, preserving the selected project's invocation/account context instead of borrowing a background server. No unsupported major family is silently treated as v1.

The temporary contract inspection directories are $TMPDIR/yard-opencode-contract-qwkhh9i5 and $TMPDIR/yard-opencode-v2-contract-zg151lyx. They are session evidence, not packaged resources or provider credential fixtures.

Safe catalogue and cache

OpenCodeCatalog parses both formats and publishes only supported opencode and github-copilot models. Disabled/deprecated entries are excluded. An OpenCode model receives the Free via OpenCode label only when input/output prices are explicitly numeric zero and every supplied price/cache field is also zero. Missing, boolean or nonzero prices do not become free. Paid OpenCode Console choices remain available through the existing OpenCode · configured model entry; discovering a free choice does not replace that configuration.

Only the selected model ID, display name, provider, free/effort metadata, checked executable, tool version and refresh time enter YardPaths.config/ai/opencode-catalog.json. Raw provider settings, API keys, auth URLs and credential files are not cached. The cache is written atomically with 0600 permissions; refresh uses a private scratch directory and bounded tool calls. Cached reads are size-limited, and the UI marks a snapshot stale after one hour. When discovery next checks, a changed executable path also triggers a refresh. Refresh is explicit in Settings and Studio, and a catalogue failure retains the last successful snapshot with an error; a valid empty catalogue is a distinct successful outcome.

yard ai:models --refresh --json exposes the same safe catalogue. --tool /absolute/path/to/opencode is accepted only with --refresh, allowing a particular installed tool to be inspected. Reading yard ai:models --json uses the existing cache. Native model selectors read the shared catalogue without needing the local HTTP servers to be running.

Preferences, selection and invocation

The Show free models preference is independent of API/provider connections. Hiding free choices does not rewrite saved conversations or their chosen model/backend/effort. Settings labels Copilot counts models listed; a listed model or a completed login command is not proof of current entitlement, authentication freshness or quota. Studio groups discovered models by provenance, and an old conversation whose model disappeared stays readable with its explicit saved selection and availability explanation.

A discovered selection is persisted as opencode-model/<provider>/<model>. Invocation passes the exact native <provider>/<model> through --model; it does not manufacture a Yard API-key alias for free models or Copilot. Before sending, the project catalogue is refreshed and that exact selection is validated. A removed model, newly priced model, failed catalogue or failed version check stops with an actionable error. No automatic replacement, retry on a different account, or switch to a paid/default model is introduced.

AgentRunner reuses the version already validated by catalogue preflight. The configured CLI entry performs its own successful version check. An empty, failed, malformed or unsupported version stops before starting an agent, rather than omitting v2 standalone execution. Existing verified API adapters and coding-tool subscriptions keep their separate connection/backend contracts. This work does not add Azure, Bedrock or local-model providers.

Authentication and account ownership

The implemented native flow, private request/receipt format, cancellation/expiry, runtime lease, Terminal failure handling and precise fake/PTY evidence are documented in HD011_012_AUTH_COMPLETION.md. Yard observes only nonce/process/status/exit metadata; OAuth/device codes and credential contents stay in OpenCode's Terminal flow. Disconnect targets Copilot rather than clearing unrelated providers. A zero exit records command completion and prompts catalogue inspection; it does not claim account validity or quota. No real Copilot account was connected or disconnected during validation.

Evidence and remaining external check

The real CLI smoke used Tests/opencode-catalog-smoke.py with temporary YARD_HOME and XDG paths, an explicitly selected executable, no inherited provider API keys, and private v2 execution. The test did not change the executable's SHA. The catalogue counts are observations of those runs, not permanent availability guarantees.

Run Catalogue evidence Model calls Outcome
OpenCode 1.19.5 Successful clean inventory: 9 free models 0 Catalogue check passed
OpenCode 2.0.32 Successful clean inventory: 12 free models 1 Catalogue passed; overall smoke failed on provider quota
The one inference above Explicit opencode/big-pickle, plan agent, tools denied, bounded prompt 1 total HTTP 429, exit 1, 0.766 s, empty response; no retry or paid switch

Final catalogue evidence:

  • V1: $TMPDIR/yard-opencode-live-mrkbi7c8/summary.json and /tmp/yard-herd-opencode-v1-smoke.log.
  • V2 and the only real inference: $TMPDIR/yard-opencode-live-4qjmy24a/summary.json, its model.jsonl error event (error.status == 429), and /tmp/yard-herd-opencode-v2-smoke.log.

The provider reported that its free usage limit had been reached. This is not a successful inference and does not close that HD011 acceptance condition. No further request was made to work around the quota. Any future live check must be separately bounded and remain on an explicitly selected free/cheap model; no run is scheduled by this document.

Deterministic/executable evidence includes five OpenCodeCatalogTests, ten StudioAgentCommandTests, six OpenCodeAuthSessionTests, five OpenCodeAuthenticationTests and one visual fixture: 27 unique focused checks passed across the recorded final runs. They cover empty/offline/malformed/changed inventories, safe cache bytes, pricing/visibility, exact invocation, actual fake CLI connect/cancel/expiry/logout, unrelated-account preservation, version reuse and blocked activation. Four light/dark waiting/failure images were inspected. The Engine wrapper owner separately passed six process/PTY checks. See the linked authentication report for exact names and logs. Real Copilot entitlement and live provider availability remain separate from those synthetic-account results.