Skip to content

fix: update models and caching price - #406

Merged
wmcmahan merged 1 commit into
mainfrom
chore/keel
Oct 1, 2026
Merged

wmcmahan merged 1 commit into
mainfrom
chore/keel

Conversation

@wmcmahan

@wmcmahan wmcmahan commented Oct 1, 2026

Copy link
Copy Markdown
Owner

No description provided.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Line 15: This doc comment still says the SDK's isRetryable flag is always followed, but 2xx failures now override it. Add the 2xx exception to the doc comment and drop the inline comment inside the function.

Evidence

Lines 26–28 make every APICallError with a 2xx status retryable, whatever the provider's flag says. The doc comment above is what tells callers how classification works, and it no longer matches the code.

@wmcmahan wmcmahan left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Advisory review by the pr-review workflow — the human merge decision stands either way.

VERDICT: REVISE
Summary: The pricing and model changes are right, but this PR also changes how agent turns finish and which errors get retried, which CONTRIBUTING.md says belongs in its own PR. The retry docs and one extra check call also need fixing.

The good part: per-model cached-input pricing is clean. It validates the new field, its tests check exact amounts, and adding claude-sonnet-5-5 and gpt-6.1-sol needs no change in context-engine profiles, because the existing claude-sonnet-5 and gpt-6 prefixes already cover them.

Overall

  • The PR covers more than its title. Under "fix: update models and caching price" it also ships:
      • an agent behaviour change: continuations with no tools, and checking the fallback text against finalAnswer;
      • a retry-policy change: any APICallError with a 2xx status is now retryable;
      • new error logging through describeError.
    • CONTRIBUTING.md says "Keep PRs focused. One concern per PR." The retry change affects every node's failure_policy, so it deserves its own PR and review. It is already a separate changeset (agent-continuation-without-tools.md). Move it, with the executor.ts and error-classification.ts changes and their tests, into a second PR.

2 findings are posted as comments on the diff.

Reviewed at 5eaf62a · with claude-opus-5-5 · workflow run


// No continuation is left, so an answer that still fails the check
// is kept but reported.
const unresolved = text.trim() === '' ? undefined : finalAnswerProblem(options?.finalAnswer, text, agentId);

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

When the first check passes, this runs the user's finalAnswer check again on the same text. A check that throws then logs final_answer_check_failed twice per turn. Reuse the earlier result, and only re-check when a continuation changed text.

Evidence
  • On the happy path the check runs at line 625 or 621, then again here on the same text.
  • After a continuation it runs a third time: once for the recovered log field at line 703, then again here on that same continuation text.

@wmcmahan
wmcmahan merged commit 351f714 into main Oct 1, 2026
18 checks passed
@wmcmahan
wmcmahan deleted the chore/keel branch October 1, 2026 23:35

This branch was successfully deployed

1 active deployment
Preview — ab08b192 Deployed Oct 1, 2026 by vercel[bot]
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