Skip to content

Remove "Model catalog refresh unavailable" warning from OpenRouter agent runs #9164

Closed

Description

@AleksandarCole

Problem

Every agent run that uses the OpenRouter runner prints this line in the live run log:

Model catalog refresh unavailable. Continuing with OpenCode configuration for openai/gpt-6.1-sol.

The run works correctly. The line is noise and makes users think something is broken.

Cause

ensureOpenCodeModelCatalog in pkg/components/runner/openrouter/run.js runs before each prompt:

  1. It checks the model catalog cache in the task directory. Each run starts with an empty task directory, so the cache is always empty.
  2. It runs opencode models openrouter --refresh --pure. This step fails in the runner (the exit status is not 0, or the command times out).
  3. It checks the model list that is bundled in OpenCode. New models such as openai/gpt-6.1-sol are not in that list.

The function then returns "unavailable". runPrompt prints the warning and continues with the model config that writeOpenCodeConfig writes. Because steps 1 to 3 give the same result on each run, the warning shows on all runs.

Proposed change

  • Remove the "unavailable" warning from the live run log, or write it to debug output only.
  • Update pkg/components/runner/openrouter/run_test.go (about line 382), which expects this line in stdout.

Optional: find out why opencode models openrouter --refresh fails in the runner (network access or the timeout), or keep the catalog cache between runs.

Acceptance criteria

  • Runs with a configured model that is not in the bundled catalog do not show the warning in the run log.
  • Runner tests pass.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions