codex/codex-rs/codex-api/tests
pmccrary-oai 6af345407d Gate experimental context by model capability at session startup (#43147)
## Why

Experimental context activation previously checked the provider and account eligibility without checking model support. Child sessions also inherited token-budget activation from their parent, even when starting fresh with a different model.

## What changed

- Add `ModelInfo.supports_experimental_context`, defaulting to `false`, and enable it for the bundled `gpt-6-astra` model. Require this capability when activating experimental context.
- Snapshot configured token-budget preferences before startup activation. Restore them for fresh child sessions before applying their starting model's defaults, while history forks retain their parent's activation.
- Pass unresolved token-budget preferences to child sessions so they can use their own model's prompts.

## Testing

Extend coverage for unsupported models, model-switch guidance under explicit and experimental activation, and child configuration from both active and inactive parents. Verify that omitted capability metadata defaults to `false`.

GitOrigin-RevId: 02df9e171682267232fa923d5ea3f7af36527808
History 2026-09-06 02:28:38 +00:00
..
clients.rs Replace Guardian tickets with parent response IDs (#43002) 2026-09-05 13:02:49 +00:00
models_integration.rs Gate experimental context by model capability at session startup (#43147) 2026-09-06 02:28:38 +00:00
realtime_websocket_e2e.rs Reconnect WebRTC Realtime sideband transports (#39257) 2026-08-18 18:41:40 +00:00
sse_end_to_end.rs Preserve raw response usage metadata (#41980) 2026-09-01 05:17:11 +00:00