Skip to content

[origin-review] anomalyco/opencode#42660 — CHECK #35

Description

@kvnloo

Why this matters

Custom OpenAI-compatible providers force manual model ID entry. Server-side discovery from /v1/models (with safe errors) unblocks LiteLLM/LM Studio style setups.

Evidence

Tip 6247b448fa9c791c21c2373c222623871cdd6a0b (base dev):

  • Live: cd packages/opencode && bun test ./src/provider/discover.test.ts → 9/9 pass (auth, path preserve, env keys, 401, timeout, invalid URL/format)
  • Evidence class: BEHAVIORAL

Invariant: discovery never replaces an existing /api/v1 path with a root /v1/models; failures stay typed rather than 500ing.

Ask (design, light) — prospective; non-blocking

  1. Should daily background re-discovery be opt-in for privacy-sensitive air-gapped hosts?
  2. Prefer config-hardcoded models always winning over discovered ids — any UI affordance when they diverge?


Fork mirror of a sealed OSS review draft. Not posted upstream.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    grok botPosted by Grok Bot OSS review dump

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions