Clarify provider ownership and compatibility decisions in the development workflow. Document the active API, SDK, deployment and migration contracts, and keep version history in release notes.
Co-authored-by: Codex <noreply@openai.com>
Use account-scoped model capabilities for discovery and routing. Let each provider project external prices and declare which credentials support quota refresh. Share alias resolution and preserve xAI adapter and account affinity decisions.
Align OAuth flow handling, protocol feature detection, Retry-After parsing, and plugin package and stream validation with their owning contracts.
Co-authored-by: Codex <noreply@openai.com>
Keep account-change dispatch shared and let each provider own its settings and quota query targets. Reuse verified account catalogs on credential changes and clarify provider ownership in the development guide.
BREAKING CHANGE: settings clients must use the provider-scoped settings map. Migration 0055 discards the RC Antigravity refresh preference and restores the provider default.
Co-authored-by: Codex <noreply@openai.com>
Confirm the request still uses the current access token before resetting transient feedback across credential revisions. Track the latest 401 independently from Cloudflare streaks so an overlapping failure cannot suppress or be erased by a successful request.
Co-authored-by: Codex <noreply@openai.com>
* fix(openai): refresh OAuth tokens rejected before expiry
A 401 on a model request marked a refreshable OAuth account Expired when
its access token had not reached its expiry. Expired accounts are left out
of both selection and scheduled refresh, so the account stayed out of
rotation until it was refreshed by hand, even though the refresh token was
still valid.
Expire the rejected access token instead and let the OAuth worker renew
it, as quota refresh already does for token_revoked. A renewed token that
is rejected again before any successful request still marks the account
Expired.
Constraint: Accounts without a refresh token or a known expiry keep the existing Expired outcome
Rejected: Match the "status=503" text inside the 401 body | free-text matching, and other 401s on unexpired tokens would still strand the account
Rejected: Refresh on every 401 without a bound | an account whose renewed tokens keep failing would refresh in a loop
Confidence: high
Scope-risk: narrow
Tested: Rust 1.99.1 fmt --check; clippy -p provider-openai --all-targets --all-features -D warnings; provider-openai tests (1264 passed); the new selector case and the adapter case fail without the selector change
Not-tested: A live upstream 401 against this build; workspace-wide clippy and tests are left to CI
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* fix(openai): preserve OAuth recovery across concurrent feedback
Report success from native endpoints and upstream adapters, and keep stale
responses from clearing the current OAuth recovery bound. Serialize model
401 and Cookie feedback with token refresh through the account lease.
Recheck credential revisions after acquiring scheduled and manual refresh
leases so a queued snapshot cannot resend an already rotated refresh token.
Cookie feedback skips writes while refresh owns the lease; a later response
can capture cookies without discarding successfully exchanged tokens.
Validated: workspace fmt and strict Clippy; 1265 provider-openai tests;
48 gateway architecture and bootstrap tests. Real upstream and store service
integration remain for live verification and CI.
Co-authored-by: Codex <noreply@openai.com>
* fix(openai): retain token recovery across cookie revisions
Use the access token and revision that were sent upstream to recognize a successful OAuth request after a concurrent cookie write. Keep account and quota recovery fenced by revision, and preserve newer rejection records and replies from superseded tokens.
Co-authored-by: Codex <noreply@openai.com>
* fix(openai): preserve account feedback across cookie writes
Reset consecutive Cloudflare failures on a successful request using the current access token. Keep quota and account state fenced by the response revision. A model 401 can shorten expiry while the cookie writer holds the refresh lease; a conflicting write is retried only for the same token.
Co-authored-by: Codex <noreply@openai.com>
* test(openai): separate risk counters from OAuth rejection
Verify that a successful request using the rejected token breaks a path-block streak without allowing a refreshed token to be rejected indefinitely.
Co-authored-by: Codex <noreply@openai.com>
---------
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
Co-authored-by: Zyy <zyycn@users.noreply.github.com>
Co-authored-by: Codex <noreply@openai.com>
Reject subsequent reads after outbound bodies exceed capacity, reuse Client Key cursor wire types, and simplify protocol fixtures.
Clarify current API contracts, module ownership, and local test setup.
Co-authored-by: Codex <noreply@openai.com>
Project known response items and nested content for history matching without changing forwarded payloads. Preserve client tool-result metadata and compare unknown variants verbatim.
Add version-pinned replay fixtures and multi-turn outbound regression coverage.
Co-authored-by: Codex <noreply@openai.com>
Pair ID-less calls and results by tool name and GenAI ordering when
counts match. Preserve ambiguous groups and existing raw JSON fields.
Co-authored-by: Zyy <zyycn@users.noreply.github.com>
Co-authored-by: Codex <noreply@openai.com>
Use a 30-second idle timeout for account retries and manual refreshes while keeping ordinary discovery bounded. Let the admin UI wait for these refreshes until completion or cancellation.
Co-authored-by: Zyy <zyycn@users.noreply.github.com>
Co-authored-by: Codex <noreply@openai.com>
Keep ordinary account cooldowns on their existing selection path, including peer accounts after quota synchronization.
Co-authored-by: Codex <noreply@openai.com>
Preserve session scheduling and retry hints while a model cools down. Show active model limits and their recovery times in the account list.
Co-authored-by: Codex <noreply@openai.com>
Give the tool row a persistent muted background and light shadow, and
increase the inset around the GitHub link.
Co-authored-by: Codex <noreply@openai.com>
Keep long pages naturally sized and share the available page height across
viewport-bound panels. Let list cards fill the remaining space while
preserving internal scrolling and pagination in short windows.
Co-authored-by: Codex <noreply@openai.com>
Support named independent tool outputs and flatten custom grammar formats.
Adapt Codex search aliases, long call IDs and tool names while preserving
history pairing and restoring client-visible names in JSON and SSE.
Refs #843
Co-authored-by: Zyy <zyycn@users.noreply.github.com>
Co-authored-by: Codex <noreply@openai.com>
Derive changelists from official client artifacts and publish them with the
matching version only after verification. Restore profiles from the shared
cache at startup and check release metadata hourly.
Filter gateway fingerprint status from OAuth requests and recognize structured
workspace policy denials without changing unrelated request data.
Co-authored-by: Codex <noreply@openai.com>
Preserve RPC status, ErrorInfo reasons and retry hints across generation,
token counting and resource queries. Isolate confirmed account denials,
keep verification links in diagnostics, and preserve access state during
token refresh.
Cover in-band and streaming failures, background query suppression and
stale credential feedback with regression tests.
Refs #836
Co-authored-by: Codex <noreply@openai.com>
Preserve chart state across updates and animate capacity, status distribution, and account reordering. Keep metric transition values synchronized when reduced motion is enabled.
Co-authored-by: Codex <noreply@openai.com>