Repository navigation
fix: move the remaining sonnet 4 calls to claude sonnet 5.5 and the merge decisions to sonnet 5 (lfx-cdp-insights-ops#820) - #4997
Conversation
…erge decisions to sonnet 5 Refs linuxfoundation/lfx-cdp-insights-ops#820 Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
PR SummaryMedium Risk Overview Member and organization merge-suggestion workflows switch to Claude Sonnet 5 with Responses may be slightly less deterministic without Reviewed by Cursor Bugbot for commit 9e4be7d. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
🔵 Needs a closer look
Live Bedrock validation remains pending for Sonnet 5 workflows that automatically merge profiles.
0 open findings
What changed in this PR
Completes the model migration started in #4996, moving remaining active Sonnet 4 calls to newer models.
Changes:
- Moves seven shared query types to Sonnet 5.5 with updated thinking settings.
- Moves member and organization merge decisions to Sonnet 5, preserving forced tool use.
- Adds Sonnet 5 model, region, and pricing definitions.
| File | Description |
|---|---|
| services/libs/types/src/llm.ts | Updates shared model settings and adds Sonnet 5 region and pricing. |
| services/libs/types/src/enums/llm.ts | Adds the Sonnet 5 model identifier. |
| services/apps/merge_suggestions_worker/src/workflows/mergeOrganizationsWithLLM.ts | Migrates organization merge decisions to Sonnet 5. |
| services/apps/merge_suggestions_worker/src/workflows/mergeMembersWithLLM.ts | Migrates member merge decisions to Sonnet 5. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Summary
Step 2 of #820, after #4996 proved Claude Sonnet 5.5 in production on the project evaluation. Bedrock retired Claude Sonnet 4 on 2026-10-16; this moves every remaining use of it, as asked by the CDP team.
LLM_SETTINGSquery types → Claude Sonnet 5.5 (us.anthropic.claude-sonnet-5-5): member enrichment, squash of multi-value attributes, squash of work experiences, repo categories, repo collections, select most relevant domain, fake organization analysis. As in fix: move project evaluation to claude sonnet 5.5 after bedrock retired sonnet 4 (lfx-cdp-insights-ops#820) #4996:temperatureremoved (Claude 5 models return 400 on non-default sampling parameters) andthinking: { type: 'between_tools' }(the lowest thinking setting on Sonnet 5.5; no tools, so the response is text only).LlmServicealready reads the first text block.us.anthropic.claude-sonnet-5), not 5.5: they force the decision tool withtool_choice: { type: 'tool' }, which Sonnet 5.5 rejects with a 400 (tool_choice: type "tool" and "any" are not supported for this model). The documented replacement istool_choice: autoplusstrict: true, but on Amazon Bedrock onlyautois available, and withautothe model may answer in text and send the decision into retries. Sonnet 5 still accepts forced tool use andthinking: { type: 'disabled' }, costs the same as 5.5 ($2 / $10 per MTok), and is active with EOL no sooner than 2027-06-30.temperatureremoved for the same reason as above.Behaviour note: without
temperature: 0, answers are no longer fully deterministic across repeated calls. This is unavoidable on the Claude 5 family.Changes
enums/llm.ts:CLAUDE_SONNET_5.llm.ts: region and pricing for Sonnet 5; the seven settings above.mergeMembersWithLLM.ts,mergeOrganizationsWithLLM.ts: model id and arguments.Before deploying
Confirm the AWS account has Sonnet 5.5 and Sonnet 5 enabled in Bedrock model access (5.5 is already used by #4996; Sonnet 5 is listed as open access).
Test plan
vitesttypes and merge_suggestions_worker,pnpm lint --deny-warnings,pnpm tsc-checkprocessMemberSourcesruns without the "Activity Retry Limit Reached" alertllmPromptHistoryshows the new model ids for the moved types; merge decisions keep producingtool_useresultsCloses linuxfoundation/lfx-cdp-insights-ops#820
🤖 Generated with Claude Code