Skip to content

Close the three deferred GPT-6 Astra gaps - #286

Merged
myzie merged 6 commits into
mainfrom
claude/astra-support-completion-fl3o7t
Sep 5, 2026
Merged

Close the three deferred GPT-6 Astra gaps#286
myzie merged 6 commits into
mainfrom
claude/astra-support-completion-fl3o7t

Conversation

@myzie

@myzie myzie commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator

Builds on #285 and carries its five commits, because CI (go-test.yml) and CodeRabbit only run against main — targeting the feature branch got this zero checks. If #285 merges first, this shrinks to the one commit on top; if it does not, this is the whole change. #285 landed Astra with three gaps recorded in its "Known gaps" section, each blocked on the model being reachable. All three close here.

Explicit prompt-cache breakpoints

The gate was left at gpt-5.6 because guessing wrong fails every Astra request, while leaving it off only forgoes an optimization. It is no longer a guess: OpenAI's prompt-caching guide draws the line at "GPT-5.6 and later" — that cohort accepts developer-placed breakpoints, GPT-5.5 and earlier take implicit ones only. Astra's published rates follow the same formula the guide states for the cohort (a cache write at 1.25× input, $12.50 against $10.00; a read at 0.1×, $1.00).

supportsExplicitPromptCaching now checks a list of prefixes instead of one. Enumerated rather than expressed as "5.6 or newer": a version comparison would opt in every future model id on faith, and gpt-5.2-pro and gpt-5.3-chat in providers/modelcaps are the standing counterexamples to a family name predicting what a variant accepts.

Long-context cache writes

Above 272K input tokens Astra bills cache writes at $25.00/1M. llm.PricingInfo had no field for it, so a write on a long request was costed at $12.50 — half of what it cost. The new LongContextCacheWritePrice runs through the catalog schema, the Python generator, CostOf, and Scaled.

The field is optional, and that is the interesting case: a model with a flat write rate and a long-context tier for everything else (nothing in the catalogs today, but the shape is legal) keeps its standard rate past the threshold rather than dropping to zero. TestPricingInfoCostOf_LongContextCacheWrite pins both branches. Astra is the only priced model with both a long-context threshold and a cache-write rate, so no other entry changes. Parse rejects a long-context write rate with no standard one beside it.

TestGPT6AstraLongContextPricing now asserts the tier is applied instead of pinning the understatement. Both cases size the whole request — cache-creation tokens count toward TotalInputTokens, which is what selects the tier, so the original 1M-token write in that test would have crossed the threshold on its own.

CLI recommendation

The catalog withheld recommended from a model the CLI could not reach. Astra now leads the OpenAI list at cli_order 1 with the 5.6 family shifted down; gpt-5.6-sol stays default, so nothing changes for anyone who does not pick Astra. The gpt- prefix already routes it to the Responses provider, so selecting it works with no other wiring.

What did not change

  • The capability entry. Still low through max, still documentation-derived, and its comment now says that without claiming a probe that has not happened — this session has no OpenAI key, so nothing here is API-verified. The docs are unambiguous on both exclusions ("GPT-6 Astra does not support none reasoning effort"; no custom temperature, top_p, or logprobs), which is why the entry is recorded rather than Unverified. A live re-probe is still worth doing.
  • Responses-only. The reasoning guide still says "Chat Completions does not support function calling with GPT-6 Astra", so the adapter omission from Add OpenAI GPT-6 Astra #285 stands.
  • The unimplemented API surface. Async tool calling, mid-turn steering, configuration_update, and misalignment monitoring remain separate pieces of work. configuration_update is Astra-only and the most likely next one.
  • Stale GPT-5.6 prices, flagged in Add OpenAI GPT-6 Astra #285 as a distinct change.

Verification

make check passes except TestListDirectoryTool_PermissionDenied, which fails identically on the parent commit — it asserts that an unreadable directory is unreadable, and this container runs as root. go build, go vet, and go test are clean in every module, and go mod tidy -diff is clean where dependencies could have moved.

🤖 Generated with Claude Code

https://claude.ai/code/session_01HdkAnjp3sZqRGdCxwhaRL5

myzie and others added 6 commits September 3, 2026 16:02
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
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
Three pieces of Astra support were deferred while the model answered
model_not_found, each recorded as a known gap. All three close here.

Explicit prompt-cache breakpoints. OpenAI's prompt-caching guide draws
the line at "GPT-5.6 and later": that cohort takes developer-placed
breakpoints, earlier models take implicit ones only. Astra is in it, and
its rates follow the same formula the guide states for the cohort -- a
cache write at 1.25x the input rate, a read at 0.1x. The gate is now a
list of prefixes rather than a single one, so the next model joins it by
name instead of by a version comparison that would opt in every future id
on faith.

Long-context cache writes. Above 272K input tokens Astra bills writes at
$25.00/1M, double the standard rate, and llm.PricingInfo had no field for
it, so a cache write on a long request was costed at half what it cost.
LongContextCacheWritePrice fills the gap through the catalog schema, the
generator, and CostOf. It is optional: a model with a flat write rate and
a long-context tier for everything else keeps that rate past the
threshold rather than dropping to zero, and the catalog rejects the rate
without a standard one beside it.

CLI recommendation. The catalog deliberately withheld "recommended" from
a model the CLI could not reach. Astra now leads the OpenAI list, ahead
of the 5.6 family; gpt-5.6-sol stays the default.

The capability entry itself is unchanged and still documentation-derived
-- the published ladder is low through max, with none, custom
temperature, top_p, and logprobs excluded -- and its comment now says so
without claiming a probe that has not happened. Chat Completions stays
unsupported: the reasoning guide is still explicit that it cannot call
functions with this model.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HdkAnjp3sZqRGdCxwhaRL5
@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Essentials

Run ID: a9d365f0-c367-49b9-9b68-bae6086287fd

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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

@myzie
myzie changed the base branch from feat/openai-gpt-6-astra to main September 5, 2026 04:01

myzie commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator Author

Heads up: no CI has run on this PR, and none will until the next push to the branch.

This PR opened against feat/openai-gpt-6-astra. go-test.yml triggers on pull_request: branches: [main], so it did not fire, and CodeRabbit skipped for the same reason (its comment above). I retargeted the base to main, but a base change is a pull_request.edited event, which is not in the default trigger types — so it did not dispatch either. list_workflow_runs for this branch is still empty at 568ec84; there is nothing red here, just nothing run.

I am not pushing an empty commit or reopening the PR to kick it, and I have no code change left to make that would justify a push. The next real push to this branch will run the full suite.

In the meantime, everything go-test.yml does was run locally on 568ec84:

  • make provider-catalog-check — clean (the generated files match catalog.json)
  • go test ./... (root)
  • cd experimental/cmd/dive && go test ./...
  • go test ./... in providers/{openai,google,grok,meta}

plus go vet, go build, and go mod tidy -diff across every module including a2a, otel, experimental/mcp, examples, and both demos.

One pre-existing failure, unrelated to this change: TestListDirectoryTool_PermissionDenied fails identically on the parent commit 3bf561a. It chmods a directory unreadable and asserts the read fails; the container runs as root, for which the mode bits do not apply. It passes in CI, which runs as a normal user.

The gap CI would still cover that I could not: the workflow has provider API keys in its environment, so any integration test gated on OPENAI_API_KEY was skipped here. That matters for this PR specifically — the gpt-6-astra capability and prompt-caching entries are derived from OpenAI's published docs, not from a live probe, and a live re-probe is still worth doing before this is treated as verified.


Generated by Claude Code

@myzie
myzie merged commit 5834b38 into main Sep 5, 2026
1 check passed
@myzie
myzie deleted the claude/astra-support-completion-fl3o7t branch September 5, 2026 13:29
@myzie myzie mentioned this pull request Sep 5, 2026
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