Skip to content

feat(openai): enable GPT-6.2 compaction and input-token counting - #1126

Merged
fuller-stack-dev merged 2 commits into
mainfrom
feat/gpt62-responses-compact-and-count
Nov 17, 2026
Merged

fuller-stack-dev merged 2 commits into
mainfrom
feat/gpt62-responses-compact-and-count

Conversation

@hannesrudolph

@hannesrudolph hannesrudolph commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Summary

Let API-key callers use the existing /v1/responses/compact and /v1/responses/input_tokens routes with openai/gpt-6.2-astra and openai/gpt-6.2-sol. Add both model IDs to the matching platform API offers and add the two capabilities to their model cards. Regenerate the provider snapshot. No changes to handlers, pricing, model defaults, or subscription offers. The compact manifest test checks the routing rule with two synthetic Responses models instead of pinning an ordered list of production IDs.

Verification

All 90 provider manifests compiled with the candidate YAML. The compiled catalog contains the four expected model/endpoint pairs for the platform API only. Existing model pricing is unchanged. 260 focused tests passed locally against this candidate (compact manifest and Worker routing, token counting, and GPT-6.2). A negative control that incorrectly allowed every Responses model to use compaction failed the new test on the ordinary Responses-only fixture, as intended. These are synthetic checks, not live inference proof.

Deployment status

Not deployed. Verify both routes against the deployed catalog after rollout.

Remaining risk

Existing account-affinity, grant and budget checks still apply. This enables standalone compaction and stateless token counting, not Batch or unrestricted multi-agent compaction. Compaction guide · Token counting.

@clawsweeper

clawsweeper Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@fuller-stack-dev

Copy link
Copy Markdown
Member

Taking the maintainer review and landing pass for this existing PR at Jason’s request. I have the latest 5be4728, including Hannes’s compact-test correction; script-tests is now green. I will preserve both commits and attribution, independently verify the narrow API-key capability/product additions, and recheck the head before any push or merge. Please flag any active follow-up edits here so we avoid overlapping writes. No release or deployment is part of this pass.

@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. P2 Normal priority bug or improvement with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Nov 17, 2026
@clawsweeper

clawsweeper Bot commented Nov 17, 2026

Copy link
Copy Markdown

Codex review: needs maintainer review before merge.

What this changes

Enable GPT-6.2 Astra and Sol on the existing API-key compaction and input-token-counting routes.

Example: POST /v1/responses/input_tokens with model openai/gpt-6.2-sol and input Hello.

  • Before: The registered model lacks the required counting capability and platform API offer.
  • After: The model qualifies for the existing stateless API-key counting route.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The focused patch appears correct and worthwhile, but synthetic verification does not satisfy the required real-behavior proof.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: API-key callers cannot use the registered GPT-6.2 models on the existing compaction and counting routes.
Reason: The maintainer-authored direction extends existing provider capabilities with a small declaration change and preserves the established subscription boundary.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR adds useful capabilities absent from main and has an active maintainer landing pass; source review found no introduced correctness defect.

Priority: P2
Reviewed head: 5be472818399075766d2ae11ed9558568e28fd0a

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: Supply redacted request/response traces through the shipped compact and input_tokens routes for both GPT-6.2 models using the candidate catalog and an API-key setup.
Agent review details

How this fits together

Provider YAML compiles into the Worker catalog, which combines model capabilities and product offers with existing policy, credential, account-affinity, and budget checks before upstream dispatch.

flowchart LR
  A[Provider manifest] --> B[Compiled catalog]
  C[API request] --> D[Model and offer selection]
  B --> D
  D --> E[Policy credentials and budgets]
  E --> F[OpenAI endpoint]
  F --> G[Response and usage settlement]
Loading

Technical review

Best possible solution:

Retain the focused manifest additions and generated catalog while reusing the existing routing, authorization, and accounting owners.

Do we have a high-confidence way to reproduce the issue?

Main's model capabilities and explicit offers omit these model/endpoint pairs, and current selection code requires them; this is source-verifiable without running target code.

Is this the best way to solve the issue?

The manifest-only extension fits the existing architecture, preserves established account and budget restrictions, and avoids unnecessary handlers or adapters.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 4a434ef28516.

Provenance checked

  • OpenAI product selections keeps the original intent (4ce3685: Declare exact endpoint/model offers separately for platform API and subscription products.)
  • GPT-6.2 model capabilities keeps the original intent (198a6d7: Register the new models with sourced capability and budget metadata while preserving credential provenance.)
  • Compact manifest test changes intended behavior with a stated reason (f983be5: Keep compaction a distinct registered-model capability; the replacement tests that invariant without pinning an ordered model inventory and retains the in-process compiler approach.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

  • Pinned manifest change: The introduced diff adds both GPT-6.2 models to the compact and counting offers and adds the corresponding model capabilities; main lacks those declarations. (providers/openai.provider.yaml:52, 5be472818399)
  • Generated artifact scope: A recursive comparison of the parsed base and head snapshots found only the two models' capability additions, matching product selections and model-index entries, and four new platform-api offer definitions; pricing and subscription declarations are unchanged. (worker/generated/provider-snapshot.json:1, 5be472818399)
  • Existing routing and authorization owners: Selection requires the endpoint capability, offer resolution checks the declared product and credential binding, and existing compact account qualification and counting stateless validation remain in force. (worker/proxy-selection.ts:117, 5be472818399)
  • Meaningful replacement test: The replacement compiles synthetic compact-capable and ordinary Responses models and checks both endpoint eligibility and offer membership, preserving the distinction without freezing the production model roster. (test/responses-compact-manifest.test.mjs:20, 5be472818399)
  • Maintainer engagement and supplied verification: The full body explicitly identifies its verification as synthetic. The discussion credits fuller-stack-dev's active review and landing pass at Jason's request: feat(openai): enable GPT-6.2 compaction and input-token counting #1126 (comment). (5be472818399)
  • Feature provenance: History identifies existing compaction, counting, and GPT-6.2 work by fuller-stack-dev and product declarations and compiler-test refactoring by vincentkoc. The original product contract explicitly requires capability changes to update product selections. The follow-history read reached the documented missing creation object; no introduction claim relies on that boundary. (providers/openai.provider.yaml:50, 4ce3685de2a5)

Likely related people:

  • Jason (Json): Raw commit 198a6d7 adds providers/openai.provider.yaml:380 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 198a6d7c8269; files: providers/openai.provider.yaml)
  • Vincent Koc: Raw commit 4ce3685 adds providers/openai.provider.yaml:50 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 4ce3685de2a5; files: providers/openai.provider.yaml)

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add P2: Useful support for two newly registered models on existing utility endpoints, with limited scope and no established urgent regression.
  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: Useful support for two newly registered models on existing utility endpoints, with limited scope and no established urgent regression.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 17, 2026, 6:33 PM ET / 23:33 UTC.

@fuller-stack-dev

Copy link
Copy Markdown
Member

Maintainer verification completed at 5be472818399075766d2ae11ed9558568e28fd0a, preserving Hannes’s two commits and the narrow scope.

  • Canonical AutoReview: all four lossless passes completed, P0–P2 scoped-clean, no findings. Independent mechanism, history, comment, and shipping reviews found no blocking defect.
  • All 90 provider manifests compile and the generated snapshot is byte-identical; semantic comparison confirms only the intended four platform API offers, two model capability sets, and corresponding index/allowlist entries changed. Worker typecheck and 264 focused tests passed.
  • Independent production-handler verification used isolated SQLite/KV and synthetic upstream responses: all 24 base requests failed closed without egress; all 24 candidate requests succeeded across both models/endpoints, unified/native/proxy routes, and environment/pooled API-key auth. Four subscription requests stayed denied without egress. API-key catalogs, zero-cost counting, conservative compact reservation, and exactly-once settlement were checked. This is deterministic handler proof, not live OpenAI entitlement or deployment proof.
  • The initial CI job’s bounded log identifies the compact-manifest test failure at line 12. Local replay isolates the obsolete three-model roster assertion; the replacement retains the routing invariant without pinning production inventory. Entire touched test file audited.

ClawSweeper’s exact-head review also reports no findings and no before-merge blocker. Live provider smoke testing remains outside this landing pass under the release/deployment hold. Waiting for the remaining exact-head consumer checks; no release or deployment is being performed.

@fuller-stack-dev
fuller-stack-dev merged commit a82cbe9 into main Nov 17, 2026
65 checks passed
@fuller-stack-dev
fuller-stack-dev deleted the feat/gpt62-responses-compact-and-count branch November 18, 2026 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal priority bug or improvement with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants