Skip to content

Call Claude through its Messages API at xhigh effort, so it gets more time to draft the notes - #81

Merged
danielchalmers merged 1 commit into
mainfrom
c/claude-messages-api
Nov 16, 2026
Merged

danielchalmers merged 1 commit into
mainfrom
c/claude-messages-api

Conversation

@danielchalmers

Copy link
Copy Markdown
Owner

Why

Claude's Chat Completions layer ignores reasoning_effort, so Claude has been drafting release notes at its default effort.
AutoTriage moved its Claude calls to the Messages API to set effort there, and Nuntia shares that client.

What

  • src/llm/ and tests/llm/ are copied verbatim from danielchalmers/AutoTriage at 9531af48a8bdf0c11690ca2e7df1602de26427f1 (AutoTriage pull requests 245 and 246).
  • Requests to api.anthropic.com now go to /v1/messages, with x-api-key and anthropic-version: 2026-10-21. Every other host still gets Chat Completions.
  • The text call that drafts the notes sends output_config.effort: "xhigh" on Claude. On the default claude-sonnet-5-5 that is one step up from its default of high, and on claude-haiku-5-5 two steps up from medium.
  • max_tokens is 64,000 on Claude, and a model that rejects effort has it left off for the rest of the run.
  • AGENTS.md describes the client's two protocols.
  • No input, default model or prompt changes.

Verification

  • npm run typecheck, npm run typecheck:test and npm test pass (322 tests), and dist/ is rebuilt.
  • The blob hashes of src/llm/ and tests/llm/ match AutoTriage at the commit above.
  • The mock job on this pull request is the first live text call through the Messages API.

Residual risk

  • Notes drafted at xhigh haven't been compared with notes drafted before. They will take longer and cost more per release.
  • The wording of Anthropic's error for a model that doesn't support effort is a guess, so on such a model the call may fail instead of retrying without it.

… time to draft the notes

Copies src/llm/ and tests/llm/ from danielchalmers/AutoTriage at 9531af48a8bdf0c11690ca2e7df1602de26427f1.
Claude's Chat Completions layer ignores reasoning_effort, so requests to api.anthropic.com now go to /v1/messages with output_config.effort set to xhigh.
@github-actions github-actions Bot added the enhancement New feature or request label Nov 16, 2026
@danielchalmers
danielchalmers merged commit 36385f4 into main Nov 16, 2026
3 checks passed
@danielchalmers
danielchalmers deleted the c/claude-messages-api branch November 16, 2026 02:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant