Skip to content

opencode models cannot authenticate against providers other than Fireworks #18

Description

@cderinbogaz

README.md:243 advertises the opencode harness as "anything on models.dev — Fireworks, Groq, OpenRouter, …", but the credential handed to the child process is chosen per harness, not per model.

providerEnvFor('opencode') is hard-wired to FIREWORKS_API_KEY (src/config.ts:40-47), and runner.ts:282 builds the child env from it. Setting secret: JUROR_OPENROUTER_API_KEY only changes which variable Juror reads — the key still reaches opencode named FIREWORKS_API_KEY, so an openrouter/... or groq/... model fails to authenticate with no visible auth error.

The documented escape hatch doesn't help either: envPassthrough explicitly strips any name matching API_KEY (src/harness/runner.ts:213-223).

Suggested scope

  • Add an optional provider_env to ModelConfig (src/types.ts:400-416).
  • Accept it in MODEL_KEYS / coerceModel (src/config.ts:466-542).
  • Prefer it at runner.ts:282. Add a config test.

A docs-only correction of the README claim is an acceptable smaller alternative — say which you're doing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestharnessModel harnesses and adding jurorshelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions