Skip to content

Add OpenAI GPT-6 Astra - #285

Closed
myzie wants to merge 5 commits into
mainfrom
feat/openai-gpt-6-astra
Closed

Add OpenAI GPT-6 Astra#285
myzie wants to merge 5 commits into
mainfrom
feat/openai-gpt-6-astra

Conversation

@myzie

@myzie myzie commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

OpenAI published gpt-6-astra today. The provider watcher found it in the models index, pricing page, and changelog. The account API still does not list it and a direct call returns model_not_found — access is gated to the Trusted Access Program, with broader API access "in the coming days". Rechecked since: /v1/models still returns 130 models with no gpt-6*, /v1/models/gpt-6-astra and /v1/responses still answer model_not_found, and the docs are unchanged.

So this lands the support we can land from documentation and the SDK, and marks the parts that need a live probe before they can be trusted. It also carries a provider-wide retry fix that came out of reading the same changelog.

What's here

Catalog and constantsopenai.ModelGPT6Astra (gpt-6-astra), 1.05M context, Responses API only. Deliberately not recommended and not default: the CLI should not offer a model that currently answers model_not_found.

Capabilities (providers/modelcaps) — reasoning effort lowmax, with none excluded and temperature refused. This is documented, not probed. It is recorded rather than left Unverified because both exclusions are stated outright in the release notes, and passing them through would send a request already known to fail.

Pricing — the first OpenAI entry to use the long-context tier: above 272K input tokens, input and cache reads bill at 2x and output at 1.5x.

openai-go v3.56.0 — OpenAI cut the SDK release the same day ("add gpt-6-astra and related features"). gpt-6-astra is the only model id it adds, and it matches the entry written from the docs. It also brings the types behind the rest of the release: Async on function and custom tool params, ResponseConfigurationUpdateItem, ResponseSteerErrorCode / ResponseSteerPendingReason, and the misalignment error objects. Dive does not use any of them yet — this is just the dependency they need.

Watcher fix — a model linked as <id>.md in an upstream index was filed as a second, phantom missing model beside the real one. Today's report showed gpt-6-astra, gpt-6-astra.md, and gpt-6 as three separate gaps. Re-running the audit after this change drops all three (the bare gpt-6 clears on its own once Astra is catalogued).

Retry handling

Two problems, both from OpenAI's Sep 2 error-code change and both provider-wide rather than Astra-specific:

Retry-After was ignored. grep -rn "Retry-After" across the repo returned nothing. Providers retried on the status code alone with their own backoff schedule, so Dive came back before the provider was ready and prolonged the condition it was waiting out. OpenAI now sends the header with 429 slow_down (traffic ramped too fast) and 503 server_is_overloaded. The header is now honored in place of the exponential backoff for the next attempt, capped at the policy's MaxWait so a provider cannot park a caller for ten minutes. Both header forms RFC 9110 allows are parsed — a delay in seconds and an HTTP-date.

Terminal 429s were retried. An exhausted credit balance, an organization or project spend limit, and an ordinary rate limit all arrive as 429; only the last is worth another attempt. Dive burned its full attempt budget on the others and delayed an error the caller has to act on. The error code now separates them (insufficient_quota, credit_balance_exhausted, and the three spend/usage limits are permanent).

providers.RetryPolicy replaces the retry options each provider assembled inline — Anthropic, Google, OpenAI Responses, OpenAI Chat Completions, and the retrying stream iterator now share one policy. providers.NewError grows WithErrorCode and WithErrorHeader options, and ProviderError exposes Code() and RetryAfter(). Codes reach the classifier two ways: parsed out of the JSON envelope where the provider hands NewError a raw body, and passed explicitly where an SDK has already parsed it. Envelope members are decoded one at a time, because a provider that sends "error" as a bare string — xAI does — would otherwise fail the whole unmarshal and lose a top-level "code" beside it.

Twelve tests cover this in providers/providers_test.go, including the delay actually used, the MaxWait cap, and the fallback to exponential backoff.

Known gaps

  • Nothing is API-verified. The effort ladder, the temperature refusal, and the prices are what OpenAI published. Re-probe when access opens; providers/modelcaps/tables.go carries the note.
  • Long-context cache writes are understated. The published rate is $25.00/1M; llm.PricingInfo has no field for it, so a cache write on a >272K request is costed at the standard $12.50. TestGPT6AstraLongContextPricing pins this so it is visible rather than silent.
  • Explicit prompt-cache breakpoints stay gated to gpt-5.6. Astra documents prompt_caching and a separate cache-write rate — the same two signals that gate 5.6 — so it is a likely candidate. Left off because guessing wrong fails every Astra request, while leaving it off only forgoes an optimization. Comment added at the gate.

New API surface, not implemented here

The release ships four Responses features that Dive has no binding for. Each is its own piece of work:

  • Async tool callingasync: true on a function or custom tool lets the model keep working while the application runs the tool; results come back later against the original call_id.
  • Mid-turn steering — send user instructions over a WebSocket while a response is in flight, preserving completed work.
  • configuration_update — change reasoning effort mid-conversation without rewriting the prompt prefix, so the cache survives. Astra-only, and it cannot be combined with automatic compaction or truncation.
  • Misalignment monitoring — asynchronous safety checks that can raise alerts or stop a conversation for review.

Separately noticed, not addressed here

  • GPT-5.6 prices are stale. The audit flagged pricing_changed: Sol $5.00/$30.00 → $4.00/$20.00, Terra $2.50/$15.00 → $2.00/$12.00, Luna $1.00/$6.00 → $0.20/$1.20. A live cost-reporting inaccuracy, but a distinct change.
  • OpenAI fast mode is unreachable. providers/openai/provider.go maps ServiceTier to auto, default, and flex only, and errors on anything else — so fast and priority cannot be requested even though the SDK defines them. Dive also never decodes the response's service_tier into Usage.Speed, so the fast-pricing branch at provider.go:139 can never fire, and the OpenAI catalog's fast_text pricing table is empty. Pre-existing, but Astra's fast tier ($20.00/$100.00) makes it more visible.
  • The docs-index watch source may be dead. catalog.json points at https://developers.openai.com/llms.txt with discovery patterns for /api/docs/(models|pricing|deprecations|changelog). That page is now a hub that links to /api/llms.txt and lists none of those paths, so the discovery source likely matches nothing. The four explicit document sources still work, which is why this went unnoticed.
  • Two stale CLI dependencies dropped. make tidy-all removes go-runewidth and uax29 from experimental/cmd/dive; neither is referenced by any Go file there. Pre-existing drift, swept up because the openai-go bump left five modules failing go mod tidy -diff.

Verification

make check passes. go build, go vet, go test, and go mod tidy -diff are clean in every module: root, providers/{openai,google,grok,meta}, a2a, otel, experimental/{mcp,cmd/dive}, examples, and demos/{colosseum,noodleville}.

🤖 Generated with Claude Code

https://claude.ai/code/session_01L21T5Bt9gsaCvdFX6GXRqa

OpenAI published gpt-6-astra today. The provider watcher found it in the
models index, pricing page, and changelog; the account API does not list
it and a direct call returns model_not_found, because access is gated to
the Trusted Access Program. Everything here therefore comes from the
published documentation rather than a probe, and is marked as such where
a later verification pass has to revisit it.

- Catalog entry and generated constants: 1.05M context, Chat Completions
  and Responses. Not marked recommended or default while the model is
  unreachable, so the CLI does not offer a model that cannot answer.
- Capabilities: reasoning effort low through max, with none excluded and
  temperature refused. Recorded rather than left Unverified because both
  exclusions are stated outright in the release notes, and forwarding
  them would send a request already known to fail.
- Pricing: the first OpenAI entry to use the long-context tier. Above
  272K input tokens input and cache reads double and output is 1.5x.
  The long-context cache-write rate has no PricingInfo field; the test
  pins what that understates.

Explicit prompt-cache breakpoints stay gated to gpt-5.6. Astra documents
prompt_caching and a cache-write rate, the same pair of signals, but
guessing wrong there fails every request rather than forgoing an
optimization, so it waits for the endpoint.

Also fixes a watcher bug this release surfaced: a model linked as
"<id>.md" in an upstream index was reported as a second, phantom missing
model beside the real one.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L21T5Bt9gsaCvdFX6GXRqa
@coderabbitai

coderabbitai Bot commented Sep 3, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Comment @coderabbitai help to get the list of available commands.

myzie and others added 4 commits September 3, 2026 16:28
OpenAI cut v3.56.0 the same day as the model ("add gpt-6-astra and
related features"), which is why the previous commit's audit ran against
a pin that predated it by hours.

The upgrade adds ChatModelGPT6Astra and the types behind the release's
new Responses surface: Async on function and custom tool params,
ResponseConfigurationUpdateItem for changing reasoning effort
mid-conversation, ResponseSteerErrorCode and ResponseSteerPendingReason
for mid-turn steering, and the misalignment error objects. Dive does not
use any of them yet; this is the dependency they need.

gpt-6-astra is the only model id the release adds, so the catalog entry
already written from the documentation matches the SDK's.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L21T5Bt9gsaCvdFX6GXRqa
The catalog listed gpt-6-astra with the openaicompletions adapter, which
exported the model constant and its pricing into the Chat Completions
package. OpenAI's reasoning guide is explicit that Chat Completions does
not support function calling with this model, so advertising it there
offers an agent library a model that cannot call tools.

Dropping the adapter removes both the constant and the pricing entry from
providers/openaicompletions; providers/openai carries every model in the
catalog and is unaffected. The cache-read coverage test grows a
responses-only set so the omission is asserted rather than silently
tolerated.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L21T5Bt9gsaCvdFX6GXRqa
OpenAI split its throttling errors on 2026-09-02: a 429 now carries
"slow_down" when traffic ramped too fast, a 503 carries
"server_is_overloaded" when a model is saturated, and both may set
Retry-After. Dive ignored the header entirely -- grep found no reference
to it anywhere -- and retried on the status code alone, so it returned
before the provider was ready and prolonged the condition it was waiting
out.

The status code is also not enough to classify a 429. An exhausted
credit balance, a spend limit, and an ordinary rate limit all arrive as
429, but only the last one is worth another attempt. Retrying the others
burns the attempt budget and delays an error the caller has to act on.

providers.RetryPolicy replaces the retry options each provider assembled
inline and gives all of them the same behavior: Retry-After takes the
place of the exponential backoff for the next attempt, capped at MaxWait
so a provider cannot park a caller for ten minutes. The delay function
the retry package calls receives only an attempt number, so Do records
the most recent error on the way out of the operation; the retry loop is
sequential, so a policy value drives one loop at a time.

Error codes reach the classifier two ways: parsed out of the JSON
envelope for the providers that hand NewError a raw body, and passed via
WithErrorCode where the SDK has already parsed it and the body is only a
message. Parsing decodes the envelope members one at a time, because a
provider that sends "error" as a bare string -- xAI does -- would
otherwise fail the whole unmarshal and lose a top-level "code" beside
it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L21T5Bt9gsaCvdFX6GXRqa
The openai-go v3.56.0 upgrade moved only providers/openai/go.mod, but
grok and meta depend on it directly and examples, the CLI, and the demos
depend on it transitively, so their manifests still pinned v3.55.0 and
`go mod tidy -diff` failed in each.

`make tidy-all` also drops go-runewidth and uax29 from the CLI module.
Neither is referenced by any Go file there; they are pre-existing drift
from an earlier CLI change, unrelated to this work.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L21T5Bt9gsaCvdFX6GXRqa
@myzie

myzie commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator Author

Superseded by #286, which was stacked on this branch and carried its five commits. The squash-merge of #286 (5834b38) landed all of this PR's content in main alongside its own, so nothing here is outstanding — GitHub just couldn't auto-close it because the squash rewrote the commit SHAs.

Verified in main: ModelGPT6Astra and the catalog entry, the Retry-After / providers.RetryPolicy refactor across Anthropic, Google, OpenAI Responses, OpenAI Completions and retrying_stream.go, and the watcher .md phantom-gap fix. Diffing main against this branch tip shows only removals of #286's additions — main is a strict superset.

Closing and deleting the branch.

@myzie myzie closed this Sep 5, 2026
@myzie
myzie deleted the feat/openai-gpt-6-astra branch September 5, 2026 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant