fix(codex): restore gateway models after reconnect#3566
Merged
Conversation
Use the gateway model catalog when the native app-server returns stale model metadata. Generated-By: PostHog Code Task-Id: dfa9be76-95bf-4166-8adc-529483e3d525
|
😎 Merged manually by @richardsolomou - details. |
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
Authenticate the gateway catalog so restricted models remain gated, and keep the catalog available when native model discovery fails. Generated-By: PostHog Code Task-Id: dfa9be76-95bf-4166-8adc-529483e3d525
charlesvien
approved these changes
Jul 19, 2026
Contributor
|
✅ Visual changes approved by @richardsolomou — baseline updated in 1 changed. |
1 updated Run: 03b80f6e-116e-4b88-98f8-7303071de456 Co-authored-by: richardsolomou <2622273+richardsolomou@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Local and worktree Codex sessions can receive stale or failed native
model/listresults after reconnecting or being unarchived. Current gateway models then disappear from the picker, while unauthenticated catalogs can also lose plan restriction metadata.Changes
I use the authenticated gateway catalog as the authoritative Codex model list, retain native labels when available, and keep restricted models behind the existing upgrade gate. The gateway catalog remains available when native discovery fails, and unavailable persisted selections are ignored.
How did you test this?
@posthog/agenttest suite (1,405 passed) and focused regression tests (29 passed).pnpm --filter @posthog/agent typecheckandpnpm --filter @posthog/agent build.Automatic notifications
Created with PostHog Code