Discover Codex subscription model catalogs - #681
Conversation
alejandro-ao
left a comment
There was a problem hiding this comment.
Review findings from the isolated worktree. Validation: 1855 tests passed, 3 skipped; Ruff lint/format and mypy passed. Live authenticated-provider behavior was not tested.
| try: | ||
| self._runtime_model_limits = await provider.discover_model_limits(self.model) | ||
| if isinstance(provider, ModelCatalogProvider): | ||
| catalog = await provider.discover_models() |
There was a problem hiding this comment.
P1 — Discover live-only models before startup/resume validation. Discovery here runs after initial provider/model resolution, but cold startup and resume resolve against durable settings, which deliberately exclude live-only models. A model selected and recorded successfully in one session can therefore be rejected on subsequent resume before discovery runs (_prepare_session_provider resolves the selection against config.provider_settings). Please discover and overlay the authenticated Codex inventory before validating explicit/resumed Codex selections, and add cold-start/resume coverage for a model absent from the static catalog.
| provider, | ||
| models=models, | ||
| default_model=(provider.default_model if provider.default_model in models else models[0]), | ||
| context_windows=context_windows, |
There was a problem hiding this comment.
P2 — Keep active-runtime validity separate from the selectable inventory. Replacing models can exclude the currently active static model. A subsequent reload_provider_settings() calls _refresh_runtime_provider(), whose _build_runtime_provider() validates that active model against this replacement inventory and raises ProviderConfigError. Thus /model background refresh can fail before reaching fresh Codex discovery. I reproduced the overlay excluding static-model and subsequent validation rejecting it. Please retain the current runtime when its model disappears from discovery, and add coverage for discovery excluding the active model followed by settings/picker refresh.
Description
tau_ai/modelsresponse alongside runtime limitstau_codingoverlay/modelbackground refresh, including while another provider is activeUser experience
New Codex subscription models become selectable as soon as OpenAI exposes them to the authenticated account. Users no longer need to wait for a Tau release that updates the static
openai-codexlist, and Tau avoids copying potentially unavailable models from the separate public OpenAI API inventory.The picker still opens immediately with the static fallback and updates in place after discovery. Account-specific metadata remains memory-only.
Issue
No linked issue. Addresses the delay between Codex subscription rollouts and Tau's checked-in model inventory.
Manual validation
/login openai-codexwith a supported ChatGPT/Codex subscription./modeland observe the static inventory immediately./sessionand confirm provider-live context limits are reported.TAU_OFFLINE=1, open/model, and confirm the static Codex fallback remains available.Checks
uv run pytest(1856 passed, 2 skipped: Windows-only updater tests)uv run ruff check .uv run ruff format --check .uv run mypycd website && hugo --minifycd website && npx --yes pagefind@latest --site public