Skip to content

feat(models): support GPT-6 Astra reasoning variants - #1282

Merged
sudomaggie merged 1 commit into
developfrom
dev/gpt6-astra
Sep 5, 2026
Merged

feat(models): support GPT-6 Astra reasoning variants#1282
sudomaggie merged 1 commit into
developfrom
dev/gpt6-astra

Conversation

@Chloe-JY

@Chloe-JY Chloe-JY commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Problem

GPT-6 Astra is omitted by OpenAI API discovery and the Codex fallback catalog. Even when added manually, it falls through the generic GPT context metadata and the GPT-5-only endpoint/reasoning checks, so direct tool requests can start on the wrong API and aggregator requests can lose the selected effort. The model picker also lacks an Astra family label.

Solution

  • Admit GPT-6 in OpenAI discovery and add gpt-6-astra to the Codex setup/refresh fallback catalog. Keep existing default-enabled models and live account metadata precedence.
  • Expose Low, Medium, High, Extra High, Max, and the existing Codex Ultra mode, with standard/fast variants. Ultra sends max plus the existing request-local delegation instructions; it is not a new API effort.
  • Route direct public OpenAI Astra requests to Responses, classify Astra reasoning for compatible providers, and select max_completion_tokens for compatible Chat Completions. Custom endpoints retain their existing endpoint policy.
  • Add the GPT 6 Astra group and matching frontend/backend metadata: 1,050,000-token context, 128,000-token maximum output in the frontend descriptor, vision, and reasoning.
  • Cover discovery payload projection, fallback/saved-account parity, live metadata precedence, serialized provider requests, streaming/non-streaming compatible requests, grouping, parsing, and model metadata.

Official references: Astra model specification and Astra migration guidance. Existing accounts use Refresh Models and enable Astra; this change does not refresh accounts in the background.

Potential risks

  • Account access and Fast availability remain provider-controlled. Astra Fast is unavailable with EU data residency; standard variants remain available. Live Astra API/OAuth calls and regional Fast behavior were not exercised.
  • Ultra retains the existing Codex delegation policy and permission checks. Live discovery can expose a narrower effort set, which remains authoritative.
  • The API request change is confined to Astra: direct OpenAI uses Responses; compatible Chat Completions uses its completion-token field. Custom gateway protocol requirements still use the existing policy and error negotiation.
  • No dependency, schema, IPC, or persistence-format changes. Revert this commit to roll back; any stored Astra selection should be switched to an available model. No historical data cleanup is required.

Verification

  • cd src-tauri && cargo test -p key_vault --lib --no-fail-fast — 382 passed.
  • cd src-tauri && cargo test -p agent_core --lib providers:: --no-fail-fast — 451 passed; 2,749 unrelated tests filtered out. No compiler warnings in either Rust test run.
  • pnpm test src/util/__tests__/modelGrouping.test.ts src/util/__tests__/modelGrouping.thresholds.test.ts src/util/__tests__/modelVariants.test.ts src/types/model/info.openai.test.ts — 54 passed across four files.
  • pnpm exec tsgo --noEmit --pretty false — passed.
  • Commit hooks ran normally: lint-staged (Oxlint, ESLint, Prettier), TypeScript, commitlint, and cd src-tauri && cargo clippy --lib --message-format=short -p agent_core -p key_vault all passed.
  • pnpm exec eslint src/util/modelGrouping.ts src/util/__tests__/modelGrouping.test.ts src/util/__tests__/modelVariants.test.ts src/types/model/info.openai.ts src/types/model/info.openai.test.ts --max-warnings 0 — passed.
  • pnpm exec eslint src/ --ext .ts,.tsx,.js,.jsx --format json — 6,431 files, zero errors or warnings. Used with the verified zero cycle count to retain the required audit trailer despite the worktree-incompatible trailer helper.
  • pnpm run check:circular — no cycles across 6,527 modules.
  • pnpm run check:test-placement — consistent across 495 directories.
  • git diff --cached --check — passed. Reviewed the full diff for scope, secrets, private paths, generated artifacts, and unrelated formatting.
  • No desktop GUI/E2E or live provider inference run. This changes catalog/metadata values without changing component layout; automated grouping/variant tests cover those values, so screenshots would add little evidence. No computer control was used.

Audit

Architecture checklist: covered compilation, production call-chain wiring, naming, effort-vs-Ultra semantics, fallback branches, provider boundaries, readability, serialized payloads, setup/saved-account parity, and live metadata/default precedence (layers 1–10 within this change). Unrelated domains and session initialization were outside scope.

Area Verdict Evidence Change or reason kept Verification
Background work keep Discovery remains explicit setup/refresh; inference remains request-driven No timers, subscriptions, workers, or retries added Production call-chain/diff review
Memory keep One bounded catalog entry and 12 fallback variants; request-local values No new retained structures or cache lifecycle Catalog cardinality and request construction tests
Scope/isolation keep Existing account/endpoint resolution and live metadata precedence Custom endpoint policy and user selections preserved Endpoint policy and live catalog tests
Rendering/hot path keep Static tier/metadata entries; no delta-loop changes No added work while idle, hidden, closed, signed out, or in a second instance Parser/grouping and transport tests

Performance verdict: pass for the scoped catalog/request changes, supported by source review and passing catalog/transport tests. No CPU/RAM improvement is claimed; no resource ownership or lifecycle changed.

Recognize Astra during OpenAI discovery and in the Codex fallback catalog,
expose its reasoning and fast variants, and preserve live account metadata.
Route direct OpenAI tool requests through Responses and resolve Astra's
reasoning family and 1.05M context consistently across Rust and TypeScript.

Cover catalog projection, provider request payloads, endpoint policy, model
grouping, and context metadata. Keep existing default-enabled models and
custom endpoint policy intact; Ultra retains the existing Max-plus-delegation
behavior rather than introducing a new API effort.

Pre-commit hook ran. Total eslint: 0, total circular: 0
@sudomaggie
sudomaggie merged commit ada9368 into develop Sep 5, 2026
6 checks passed
@Harry19081 Harry19081 added enhancement New feature or request agent Agent runtime, behavior, memory, providers, or orchestration labels Sep 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent Agent runtime, behavior, memory, providers, or orchestration enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants