Repository navigation
fix(codex): preserve Astra Ultra workflow metadata - #6718
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The changes are cohesive, covered by targeted tests, and appear to correctly preserve Ultra workflow metadata across the catalog/manifest pipeline.
Pull request overview
Restores GPT-6 Astra’s Ultra option in generated Codex catalogs while preserving the workflow metadata (multi_agent_reasoning_effort, multi_agent_version) needed for Codex to execute Ultra correctly (rather than silently falling back to max).
Changes:
- Add Ultra to Astra’s fallback reasoning-level advertisement and default its workflow metadata (
xhigh+v2) in the generated descriptor. - Preserve
multi_agent_reasoning_effort/multi_agent_versionthrough the existing nullable-scalar capability propagation path (including intersection behavior). - Add regression tests to validate metadata round-trip and explicit overrides/null preservation.
File summaries
| File | Description |
|---|---|
| backend/internal/service/openai_codex_models_service.go | Adds Astra Ultra to supported reasoning levels and emits default Ultra workflow metadata for Astra descriptors. |
| backend/internal/service/openai_codex_models_service_test.go | Updates descriptor expectations to include Ultra + multi-agent metadata for Astra (and gpt-6 alias). |
| backend/internal/service/openai_codex_model_metadata.go | Extends preserved Codex scalar-capability fields to include Ultra workflow metadata and adds Ultra description text. |
| backend/internal/service/openai_codex_model_metadata_test.go | Adds tests ensuring workflow metadata is preserved through extraction, conversion, and group/alias handling. |
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
373
to
+376
| gpt6 := newConfiguredCodexModelDescriptor("gpt-6") | ||
| require.Equal(t, "GPT-6 (Astra)", gpt6.DisplayName) | ||
| require.Equal(t, []string{"low", "medium", "high", "xhigh", "max"}, effortsFromConfiguredCodexLevels(gpt6.SupportedReasoningLevels)) | ||
| require.Equal(t, []string{"low", "medium", "high", "xhigh", "max", "ultra"}, effortsFromConfiguredCodexLevels(gpt6.SupportedReasoningLevels)) | ||
| require.Equal(t, "xhigh", *gpt6.MultiAgentReasoningEffort) |
Wei-Shaw
added a commit
to MarushiruDonato/sub2api_copy
that referenced
this pull request
Sep 7, 2026
…roup parameter - Resolve conflict in openai_codex_models_service_test.go: keep both GPT-6 Astra instructions template assertion (from this PR) and ultra reasoning level + multi_agent fields (from Wei-Shaw#6718 on main) - Fix compilation error on main: add missing `group *Group` parameter to buildCodexModelsManifestForAccounts calls in openai_codex_model_metadata_test.go (lines 24, 32) — caused by Wei-Shaw#6688 changing the function signature while Wei-Shaw#6718 added new callers with the old signature
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
Restore GPT-6 Astra's Ultra option in generated Codex catalogs and preserve the metadata that tells Codex how to execute it. This is a catalog/workflow fix, not a new inference reasoning level.
The current fallback advertises Astra only through
max. Merely appendingultrawould also be incorrect: withoutmulti_agent_reasoning_effort, Codex falls back tomax, whereas the official Astra catalog specifiesxhigh.Source of truth
Verified against
openai/codexcommita9896da3febcaf30e1c5d7b452fb6334b1a0bc51:low, medium, high, xhigh, max, ultra,multi_agent_reasoning_effort: "xhigh", andmulti_agent_version: "v2".max, another supported non-Ultra effort, ormedium.Changes
xhighinference override and v2 selector; thegpt-6alias uses the same descriptor.multi_agent_reasoning_effortandmulti_agent_versionthrough upstream catalog extraction, persisted metadata, routed group catalogs, and standard model-list conversion using the existing nullable-scalar capability path.null; conflicting/missing peer metadata keeps the existing conservative intersection behavior.This does not alter raw Responses request normalization, billing, group effort limits, or implement server-side subagents. Codex translates Ultra to the ordinary inference effort before requests reach Sub2API. Explicit provider reasoning-level lists retain precedence over the fallback.
Validation
go test ./internal/service -run 'Test(AstraUltra|AstraCodexTool|NewConfiguredCodexModelDescriptor|BuildCodexModelsManifest|CompleteAPIKeyCodexModelsManifest|SyncUpstreamModelCatalog)' -count=1passed on upstreamab99d56e9626e6cd731592dae8553c9758a0efa2plus this patch.codex-cli 0.153.4, with an isolated home and the corrected catalog, sentreasoning.effort: "xhigh"when configured forultra. A loopback-only endpoint captured the request and intentionally returned HTTP 400; no remote inference was performed.git diff --checkpassed.The new regressions cover metadata extraction/snapshot round-trip, aliases, group intersection, native and converted catalogs, and explicit overrides/nulls. Existing descriptor tests verify Astra and its alias; other model expectations remain unchanged.
Related PRs
Follow-up to #6572 and #6628. The latter explicitly used an Astra fallback without Ultra. Open #6678 addresses stale image modalities and #6690 addresses
reasoning.mode; neither covers this workflow metadata. No duplicate Ultra PR was found in the open/all-state keyword searches.Local Codex configuration and catalog files are not included in this PR.