Repository navigation
Conversation
Pepps233
self-requested a review
October 4, 2026 18:02
Pepps233
added this pull request to stack #256
October 4, 2026 18:34
Route hosted turns, tool loops, compaction, summaries and child agents through one constrained Anthropic gateway. Persist private operation identity and the request digest before sending, reject transport and credential overrides, and suppress replacement generations after ambiguous failures so metering cannot be bypassed or duplicated.
Pepps233
force-pushed
the
codex/token-pr-companion-02-hosted-gateway
branch
from
October 4, 2026 18:35
424026f to
f1b79c8
Compare
Pepps233
requested changes
Oct 4, 2026
Pepps233
left a comment
Contributor
There was a problem hiding this comment.
make sure routing requests through our cloud gateway is not enabled by default. it should only be enabled if the user chooses to auth with us. this pr is approved, disregard the request changes flag
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an opt-in hosted model transport that routes every generation through the authenticated cloud gateway and prevents automatic replacement requests after ambiguous failures.
Reasoning
Pricing cannot be authoritative if compaction, summaries, tool turns, or child agents can bypass the metered transport.
One constrained Anthropic runtime and a private, durably persisted operation ID cover those paths while suppressing retries that could create duplicate billable generations.
The native server starts requiring this transport in the following PR; deployment depends on the matching cloud gateway implementation.
Changes
Testing
npm run checknpm run build:offlinepackages/coding-agent:node ../../node_modules/vitest/dist/cli.js --run test/hosted-model-gateway.test.tspackages/ai:node ../../node_modules/vitest/dist/cli.js --run test/together-models.test.ts test/generate-models-strict.test.ts: 7 tests passed after incorporating the catalog prerequisite.node --test scripts/vendored-braces-security.test.mjs: 11 tests passed against the inherited dependency patch.