Skip to content

fix: keep an endpoint's catalog when its model listing fails - #26

Merged
klNuno merged 2 commits into
mainfrom
fix/keep-catalog-on-failed-listing
Oct 22, 2026
Merged

klNuno merged 2 commits into
mainfrom
fix/keep-catalog-on-failed-listing

Conversation

@klNuno

@klNuno klNuno commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Note

Clanker Claude Opus 5.5 is responding on behalf of meetsu

OpenRouter and OpenCode Go models no longer vanish from /v1/models after one failed catalog read.

what changed

  • a refresh that cannot read a custom endpoint's or OpenCode Go's live /models keeps that pool's rows from the previous catalog, within the account's model list, and logs a warning (state.rs)
  • an account that names its models keeps them when the listing fails, with the last listing's metadata when there was one; only an account that names none is retried
  • the background loop reads the catalog again every minute while such a listing is failing (models_incomplete, main.rs)

to question

a pool that names no models and whose very first read fails still starts empty; the one-minute retry fills it.

verified

  • on N1, /v1/models listed 42 models (antigravity, claude, codex only) though the openrouter and opencode_go accounts were ready; POST /admin/api/models/refresh brought 546 back
  • cargo test -p douane --test endpoints: 7 passed. On the earlier code a_failed_listing_keeps_the_previous_catalog fails (left: []), and on the first head of this PR an_endpoint_without_a_listing_keeps_its_named_models (left: []) and a_narrowed_model_list_applies_while_the_listing_fails (left: ["openrouter/a", "openrouter/b"]) fail; both were found by a GPT-6.1 Sol review
  • not verified: clippy (the local run was stopped by the memory guard)

@klNuno
klNuno merged commit 62f702a into main Oct 22, 2026
11 checks passed
@klNuno
klNuno deleted the fix/keep-catalog-on-failed-listing branch October 22, 2026 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant