Skip to content

feat: fall back to gpt-6.2 sol and let the closing synthesis finish - #39

Merged
hyochan merged 3 commits into
mainfrom
feat/gpt-6-2-sol
Nov 18, 2026
Merged

hyochan merged 3 commits into
mainfrom
feat/gpt-6-2-sol

Conversation

@hyochan

@hyochan hyochan commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Summary

  • The OpenAI fallback runs GPT-6.2 Sol (gpt-6.2-sol) at high effort, instead of GPT-6.1 Sol.

    • The price is the same ($2 input, $10 output per 1M tokens), with the same quota weight of 1.
    • Gitdog falls back to it when Anthropic credit is exhausted or a spend limit is reached, which is the situation right now.
  • Own OpenAI keys can now choose GPT-6.2 Sol. GPT-6.1 Sol stays the default, since keys saved before 6.2 were checked against 6.1 and store no model.

  • OpenAI cache usage is billed instead of failing the request.

    • OpenAI prompt caching stays off: explicit mode with no breakpoint, verified on 6.2 to report no cache tokens. Its automatic mode rewrites the whole prompt whenever the end changes, as a probe showed.
    • If OpenAI reports cache usage anyway, it was held as ambiguous and failed the review. Now it is recorded like Claude's: a write at 1.25x and a read at the model's read rate (0.05x on 6.2, 0.1x on 6.1). Both are part of input_tokens.
    • Usage where writes plus reads exceed the input, or totals do not add up, is still held as ambiguous.
  • Review records name the model that answered, reading it from the metered route that switches to the fallback. Today's production records said claude-opus-5-5 for reviews GPT-6.1 Sol served. The same fix is in draft PR 38.

  • The closing synthesis of a review may outlast the two-minute request limit.

    • In production on the Sol fallback, two reviews (22:13 and 23:03) used all 8 turns. Their final pr-review/final request was cut off at exactly 120 seconds.
    • The attempt became ambiguous, the review failed, and the account was blocked for 30 minutes, so the next review failed too.
    • That one request now gets the time left until 7 minutes after the action started, between 2 and 5 minutes, which leaves room for verification before the 10-minute action limit. Every other request keeps 120 seconds.

Checked against the real API (production OpenAI key)

  • GET /v1/models/gpt-6.2-sol: 200.
  • A review-shaped request through OpenAIProvider (structured output, tools, encrypted reasoning) returned a tool call in 2.1 seconds with normal usage.
  • Three requests with caching off reported zero cache tokens. With caching on, the first request wrote 3,218 of 3,221 input tokens, and a repeat read them, both counted inside input_tokens.

Verification

  • bun run lint, bun run typecheck, bun run build, bunx prettier --check .
  • bun run test: 2108 passed, including OpenAI cache billing, inconsistent cache usage and per-request timeouts
  • bun run test:cli: 115 passed; bun run check:api: 95 functions match

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Visit the preview URL for this PR (updated for commit 7192d6f):

https://codeyou-df251--pr39-feat-gpt-6-2-sol-835rdw4q.web.app

(expires Wed, 25 Nov 2026 14:13:52 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 844dad9c62537d028cabc21008e4e2e4031ce4e5

gitdogai[bot]
gitdogai Bot previously approved these changes Nov 18, 2026

@gitdogai gitdogai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found in 8cf2d04

Approved because no issues were found in fully reviewed changes. Tests were not run. Gitdog

@hyochan hyochan left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review findings from an independent Opus review of this branch.

Comment thread convex/_ai/config.ts Resolved
Comment thread e2e/runPrReview.ts Resolved
Comment thread convex/_ai/chatBilling.ts Resolved
Comment thread convex/_ai/providers.ts Resolved
@gitdogai
gitdogai Bot dismissed their stale review November 18, 2026 14:06

New commits were pushed after the commit Gitdog approved. Comment @gitdogai review to review them.

@hyochan

hyochan commented Nov 18, 2026

Copy link
Copy Markdown
Member Author

@gitdogai review

@gitdogai

gitdogai Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Review not completed for 5880dd7

Gitdog could not complete the review. Comment @gitdogai review to try again.

@hyochan hyochan changed the title feat: fall back to gpt-6.2 sol feat: fall back to gpt-6.2 sol and let the closing synthesis finish Nov 18, 2026
@hyochan
hyochan merged commit b5ddcbd into main Nov 18, 2026
9 checks passed
@hyochan
hyochan deleted the feat/gpt-6-2-sol branch November 18, 2026 14:14
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