Skip to content

chore: bump and switch LLM models per query complexity (CM-1051)#3944

Merged
skwowet merged 4 commits intomainfrom
improve/CM-1051
Mar 27, 2026
Merged

chore: bump and switch LLM models per query complexity (CM-1051)#3944
skwowet merged 4 commits intomainfrom
improve/CM-1051

Conversation

@skwowet
Copy link
Copy Markdown
Collaborator

@skwowet skwowet commented Mar 23, 2026

Summary

Bump and switch LLM models per query complexity to optimize cost and response quality:

  • Downgrade to Haiku 4.5 for simple structured tasks such as LinkedIn profile matching, GitHub org matching, and bot validation. This reduces inference costs with no meaningful quality loss.
  • Bump Sonnet 3.5/V2 to Sonnet 4 for complex multi-step tasks including member enrichment, attribute squashing, work experience squashing, and repo categorization or collections. This stays within the same cost tier while improving output quality.
  • Add CLAUDE_HAIKU_4_5 model type with region and pricing configuration.

Note

Medium Risk
Changes which Bedrock Claude models (and token limits) are used for multiple production LLM query types, which can affect output quality/structure and downstream enrichment behavior. Low code risk but moderate product/data-risk if new model outputs differ from prior assumptions.

Overview
Updates LLM model routing and cost configuration. Adds CLAUDE_HAIKU_4_5 to LlmModelType and wires it into LLM_MODEL_REGION_MAP and LLM_MODEL_PRICING_MAP.

Rebalances models and token limits per query type. Several LLM_SETTINGS entries move from Sonnet 3.5/V2 to CLAUDE_SONNET_4 for more complex tasks, while simpler tasks (LinkedIn related profile matching, GitHub org matching, bot validation) switch to CLAUDE_HAIKU_4_5; max_tokens values are reduced from the prior very large defaults to tighter per-task limits (including lowering MEMBER_ENRICHMENT to 65536).

Written by Cursor Bugbot for commit 704be90. This will update automatically on new commits. Configure here.

@skwowet skwowet self-assigned this Mar 23, 2026
@skwowet skwowet changed the title feat: use Claude Haiku 4.5 for low-complexity llm queries feat: use Claude Haiku 4.5 for low-complexity llm queries (CM-1051) Mar 23, 2026
@skwowet skwowet changed the title feat: use Claude Haiku 4.5 for low-complexity llm queries (CM-1051) chore: optimize llm model usage across query types (CM-1051) Mar 25, 2026
@skwowet skwowet changed the title chore: optimize llm model usage across query types (CM-1051) chore: bump and switch LLM models per query complexity (CM-1051) Mar 25, 2026
@skwowet skwowet marked this pull request as ready for review March 25, 2026 14:17
Copilot AI review requested due to automatic review settings March 25, 2026 14:17
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the LLM model selection strategy to reduce cost on simpler tasks and improve quality on complex workflows by introducing Claude Haiku 4.5 and moving several query types to Claude Sonnet 4.

Changes:

  • Add CLAUDE_HAIKU_4_5 model type, including region mapping and pricing estimates.
  • Switch selected “simple/structured” query types to Haiku 4.5 and “complex/multi-step” query types to Sonnet 4.
  • Update LLM_SETTINGS to reflect the new per-query model choices.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 7 comments.

File Description
services/libs/types/src/llm.ts Adds Haiku 4.5 region/pricing and remaps multiple LlmQueryType settings to Haiku 4.5 or Sonnet 4.
services/libs/types/src/enums/llm.ts Adds the CLAUDE_HAIKU_4_5 model enum value (Bedrock model ID).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@skwowet skwowet requested a review from joanagmaia March 25, 2026 14:43
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Mar 25, 2026

CLA assistant check
All committers have signed the CLA.

Copy link
Copy Markdown

@cursor cursor bot left a comment

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.

skwowet added 3 commits March 25, 2026 20:38
Signed-off-by: Yeganathan S <63534555+skwowet@users.noreply.github.com>
Signed-off-by: Yeganathan S <63534555+skwowet@users.noreply.github.com>
Signed-off-by: Yeganathan S <63534555+skwowet@users.noreply.github.com>
@skwowet skwowet merged commit 68e5d89 into main Mar 27, 2026
10 checks passed
@skwowet skwowet deleted the improve/CM-1051 branch March 27, 2026 12: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.

4 participants