Skip to content

fix: move project evaluation to claude sonnet 5.5 after bedrock retired sonnet 4 (lfx-cdp-insights-ops#820) - #4996

Merged
ulemons merged 4 commits into
mainfrom
fix/issue-820-sonnet-4-eol
Oct 16, 2026
Merged

ulemons merged 4 commits into
mainfrom
fix/issue-820-sonnet-4-eol

Conversation

@ulemons

@ulemons ulemons commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Since 2026-10-16 04:00 UTC every project evaluation fails with Bedrock's "This model version has reached the end of its life" for us.anthropic.claude-sonnet-4-20250514-v1:0. The onboarding bot still parses requests (Haiku 4.5) but every new non-LF project ends in "⚠️ something went wrong on our side", and the nightly discovery run produced 15 error rows and nothing else. The same model is behind the member-enrichment workflows (processMemberSources is already failing in cdp-alerts).

Step 1 of 2 (this PR): move only LlmQueryType.PROJECT_EVALUATION to Claude Sonnet 5.5 as a quick production check of the new model. Step 2: once an evaluation succeeds on it, a follow-up PR moves the other seven query types and the two hard-coded ids in the merge-suggestions workflows, as asked by the CDP team.

Why Sonnet 5.5 and not 4.5: on Bedrock Sonnet 4.5 is already "Legacy" with EOL on 2027-04-08; Sonnet 5.5 launched 2026-09-28 with EOL no sooner than 2027-09-28, supports the Invoke API with anthropic_version: bedrock-2023-05-31 from us-east-1 (what LlmService uses), and costs $2/$10 per MTok instead of $3/$15.

Changes

  • enums/llm.ts: CLAUDE_SONNET_5_5 = 'us.anthropic.claude-sonnet-5-5' (US geo inference id from the AWS model card).
  • llm.ts: region and pricing for it; PROJECT_EVALUATION points to it. Every other query type stays on Sonnet 4 for now.

Before deploying

Bedrock lists Sonnet 5.5 access as "See Access" rather than "Open": make sure the production AWS account has the model enabled (Bedrock → Model access), e.g. aws bedrock get-inference-profile --inference-profile-identifier us.anthropic.claude-sonnet-5-5 --region us-east-1. If it is not available, the fallback is Sonnet 5 (us.anthropic.claude-sonnet-5, open access).

Test plan

  • vitest types, pnpm lint --deny-warnings, pnpm tsc-check
  • Deploy backend (hosts the evaluation endpoint)
  • Press "Try again" on the charmbracelet/wish thread: the evaluation runs and the row leaves error
  • llmPromptHistory shows a project_evaluation row with model us.anthropic.claude-sonnet-5-5

Refs linuxfoundation/lfx-cdp-insights-ops#820

🤖 Generated with Claude Code

…ed sonnet 4

Refs linuxfoundation/lfx-cdp-insights-ops#820

Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
@ulemons ulemons self-assigned this Oct 16, 2026
Copilot AI balanced review requested due to automatic review settings October 16, 2026 10:37
@cursor

cursor Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

PR Summary

Medium Risk
Changes production LLM model and response parsing for project evaluation; mis-parsed multi-block responses or missing Bedrock model access would break evaluations until fixed.

Overview
Project evaluation is moved off retired Claude Sonnet 4 to Claude Sonnet 5.5 on Bedrock, with region/pricing wired for the new model id. Only LlmQueryType.PROJECT_EVALUATION changes in this PR; other query types stay on Sonnet 4 for a follow-up.

That query’s Bedrock args swap temperature: 0 for thinking: { type: 'between_tools' }, matching Sonnet 5.5’s extended reasoning mode.

LlmService no longer assumes the answer is body.content[0].text; it uses firstTextBlock so the parsed answer is the first type: 'text' block when the response includes non-text blocks (e.g. thinking) ahead of the final text.

Reviewed by Cursor Bugbot for commit 37c51af. Bugbot is set up for automated code reviews on this repo. Configure here.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The pricing configuration understates costs for the selected US geographic inference profile.

1 open finding
What changed in this PR

Moves project evaluation to Claude Sonnet 4.5 to restore evaluations after Sonnet 4 retirement, leaving other query types unchanged.

Changes:

  • Adds the Sonnet 4.5 model identifier.
  • Registers its region and pricing and selects it for project evaluation.
File Description
services/​libs/​types/​src/​llm.ts Adds model mappings and switches project evaluation.
services/​libs/​types/​src/​enums/​llm.ts Defines the Sonnet 4.5 US inference profile.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread services/libs/types/src/llm.ts Outdated
…ed sonnet 4

Refs linuxfoundation/lfx-cdp-insights-ops#820

Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
Copilot AI balanced review requested due to automatic review settings October 16, 2026 10:59
@ulemons ulemons changed the title fix: move project evaluation to claude sonnet 4.5 after bedrock retired sonnet 4 (lfx-cdp-insights-ops#820) fix: move project evaluation to claude sonnet 5.5 after bedrock retired sonnet 4 (lfx-cdp-insights-ops#820) Oct 16, 2026

@cursor cursor 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.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 2804145. Configure here.

Comment thread services/libs/types/src/llm.ts
Comment thread services/libs/types/src/llm.ts
…onnet 5.5

Refs linuxfoundation/lfx-cdp-insights-ops#820

Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Request parameters and response parsing remain incompatible with the new model and can prevent successful evaluations.

2 open findings
1 resolved since last review

🧠 Review effort: Balanced

Comment thread services/libs/types/src/llm.ts
Comment thread services/libs/types/src/llm.ts Outdated
Copilot AI balanced review requested due to automatic review settings October 16, 2026 11:10
Refs linuxfoundation/lfx-cdp-insights-ops#820

Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Production model access and a successful end-to-end evaluation remain unverified.

2 open findings

🧠 Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 16, 2026 11:16
@ulemons
ulemons merged commit 054c855 into main Oct 16, 2026
14 checks passed
@ulemons
ulemons deleted the fix/issue-820-sonnet-4-eol branch October 16, 2026 11:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Production model access and a successful end-to-end evaluation still require confirmation.

0 open findings

2 resolved since last review

🧠 Review effort: Balanced

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.

2 participants