Skip to content

[Bug] Large static model catalogues rebuild provider policy for every row #8951

Closed

Description

@oliver-mee

Client or integration

Claude Code

Area

Catalog / models

Summary

A large static catalogue can make ocx claude miss its 3-second metadata deadline even with no disabled models. The shared catalogue builder repeatedly merges, clones and freezes the full provider policy for each model. The same builder serves /v1/models, Codex catalogue sync and the dashboard Models page. The startup timeout was measured in Claude Code, not in those other clients.

This is separate from the exclusion-list scans in #8945 and #8946.

Reproduction

  1. On dev, configure four OpenAI-compatible providers with liveModels: false. Give each 600 synthetic model IDs in models and a matching modelContextWindows entry per ID. Leave disabledModels empty.
  2. Start the local proxy and warm the catalogue once. Clear the test profile's picker cache before each launch.
  3. Run ocx claude --version three times. The base took 6.7 to 9.1 seconds and missed the picker refresh twice. Direct context metadata reads took 2.83 to 3.02 seconds. No inference request was sent.

Expected: prepare provider-wide policy once per captured provider, preserve per-model metadata, and let the launcher stay within its existing request deadlines.

Version

Upstream dev 45c512dbd, Bun 1.4.4, Claude Code 2.1.328

Operating system

Ubuntu 24.04 LTS (arm64)

Provider and model

Synthetic OpenAI-compatible providers with static catalogues. No upstream account or model is required.

Logs or error output

⚠ Gateway model cache could not be refreshed; the model picker may be stale.

Checks

  • I searched existing issues and documentation.
  • I removed secrets, tokens, account details, request credentials, and personal data.

Activity

  1. added
    bug
    catalog
    provider
    on Nov 19, 2026
  2. lidge-jun commented on Nov 20, 2026

    @lidge-jun
    Owner

    Fixed by #8952, squash-merged into dev as db2a083.

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

    bugcatalogprovider

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions