Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ async def invoke_bedrock(
)

try:
modelId = "us.anthropic.claude-sonnet-4-20250514-v1:0"
modelId = "us.anthropic.claude-sonnet-4-5-20250929-v1:0"
accept = "application/json"
contentType = "application/json"
response = await bedrock_client.invoke_model(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { continueAsNew, proxyActivities } from '@temporalio/workflow'

import { LLMSuggestionVerdictType, MemberMergeSuggestionTable } from '@crowd/types'
import { LLMSuggestionVerdictType, LlmModelType, MemberMergeSuggestionTable } from '@crowd/types'

import * as commonActivities from '../activities/common'
import * as memberActivities from '../activities/memberMergeSuggestions'
Expand All @@ -23,8 +23,8 @@ export async function mergeMembersWithLLM(
args: IProcessMergeMemberSuggestionsWithLLM,
): Promise<void> {
const SUGGESTIONS_PER_RUN = 10
const REGION = 'us-east-1'
const MODEL_ID = 'us.anthropic.claude-sonnet-4-20250514-v1:0'
const REGION = 'us-west-2'
const MODEL_ID = LlmModelType.CLAUDE_SONNET_4_5
const MODEL_ARGS = {
max_tokens: 2000,
anthropic_version: 'bedrock-2023-05-31',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import { continueAsNew, proxyActivities } from '@temporalio/workflow'

import { LLMSuggestionVerdictType, OrganizationMergeSuggestionTable } from '@crowd/types'
import {
LLMSuggestionVerdictType,
LlmModelType,
OrganizationMergeSuggestionTable,
} from '@crowd/types'

import * as commonActivities from '../activities/common'
import * as organizationActivities from '../activities/organizationMergeSuggestions'
Expand All @@ -22,8 +26,8 @@ export async function mergeOrganizationsWithLLM(
args: IProcessMergeOrganizationSuggestionsWithLLM,
): Promise<void> {
const SUGGESTIONS_PER_RUN = 5
const REGION = 'us-east-1'
const MODEL_ID = 'us.anthropic.claude-sonnet-4-20250514-v1:0'
const REGION = 'us-west-2'
const MODEL_ID = LlmModelType.CLAUDE_SONNET_4_5
const MODEL_ARGS = {
max_tokens: 2000,
anthropic_version: 'bedrock-2023-05-31',
Expand Down
1 change: 1 addition & 0 deletions services/libs/types/src/enums/llm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ export enum LlmModelType {
CLAUDE_3_5_SONNET_V2 = 'anthropic.claude-3-5-sonnet-20241022-v2:0',
CLAUDE_3_OPUS = 'anthropic.claude-3-opus-20240229-v1:0',
CLAUDE_SONNET_4 = 'us.anthropic.claude-sonnet-4-20250514-v1:0',
CLAUDE_SONNET_4_5 = 'us.anthropic.claude-sonnet-4-5-20250929-v1:0',
}

export enum LlmQueryType {
Expand Down
23 changes: 14 additions & 9 deletions services/libs/types/src/llm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export const LLM_MODEL_REGION_MAP: Record<LlmModelType, string> = {
[LlmModelType.CLAUDE_3_5_SONNET]: 'us-east-1',
[LlmModelType.CLAUDE_3_5_SONNET_V2]: 'us-west-2',
[LlmModelType.CLAUDE_SONNET_4]: 'us-east-1',
[LlmModelType.CLAUDE_SONNET_4_5]: 'us-west-2',
}

// to estimate costs - these numbers can change
Expand All @@ -52,75 +53,79 @@ export const LLM_MODEL_PRICING_MAP: Record<LlmModelType, ILlmPricing> = {
costPer1000InputTokens: 0.003,
costPer1000OutputTokens: 0.015,
},
[LlmModelType.CLAUDE_SONNET_4_5]: {
costPer1000InputTokens: 0.003,
costPer1000OutputTokens: 0.015,
},
}

export const LLM_SETTINGS: Record<LlmQueryType, ILlmSettings> = {
[LlmQueryType.MEMBER_ENRICHMENT]: {
modelId: LlmModelType.CLAUDE_3_5_SONNET,
modelId: LlmModelType.CLAUDE_SONNET_4_5,
arguments: {
max_tokens: 200000,
anthropic_version: 'bedrock-2023-05-31',
temperature: 0,
},
},
[LlmQueryType.MEMBER_ENRICHMENT_FIND_RELATED_LINKEDIN_PROFILES]: {
modelId: LlmModelType.CLAUDE_3_5_SONNET_V2,
modelId: LlmModelType.CLAUDE_SONNET_4_5,
arguments: {
max_tokens: 200000,
anthropic_version: 'bedrock-2023-05-31',
temperature: 0,
},
},
[LlmQueryType.MEMBER_ENRICHMENT_SQUASH_MULTIPLE_VALUE_ATTRIBUTES]: {
modelId: LlmModelType.CLAUDE_3_5_SONNET_V2,
modelId: LlmModelType.CLAUDE_SONNET_4_5,
arguments: {
max_tokens: 200000,
anthropic_version: 'bedrock-2023-05-31',
temperature: 0,
},
},
[LlmQueryType.MEMBER_ENRICHMENT_SQUASH_WORK_EXPERIENCES_FROM_MULTIPLE_SOURCES]: {
modelId: LlmModelType.CLAUDE_3_5_SONNET_V2,
modelId: LlmModelType.CLAUDE_SONNET_4_5,
arguments: {
max_tokens: 200000,
anthropic_version: 'bedrock-2023-05-31',
temperature: 0,
},
},
[LlmQueryType.MATCH_MAIN_GITHUB_ORGANIZATION_AND_DESCRIPTION]: {
modelId: LlmModelType.CLAUDE_3_5_SONNET_V2,
modelId: LlmModelType.CLAUDE_SONNET_4_5,
arguments: {
max_tokens: 200000,
anthropic_version: 'bedrock-2023-05-31',
temperature: 0,
},
},
[LlmQueryType.REPO_CATEGORIES]: {
modelId: LlmModelType.CLAUDE_3_5_SONNET_V2,
modelId: LlmModelType.CLAUDE_SONNET_4_5,
arguments: {
max_tokens: 200000,
anthropic_version: 'bedrock-2023-05-31',
temperature: 0,
},
},
[LlmQueryType.REPO_COLLECTIONS]: {
modelId: LlmModelType.CLAUDE_3_5_SONNET_V2,
modelId: LlmModelType.CLAUDE_SONNET_4_5,
arguments: {
max_tokens: 200000,
anthropic_version: 'bedrock-2023-05-31',
temperature: 0,
},
},
[LlmQueryType.MEMBER_BOT_VALIDATION]: {
modelId: LlmModelType.CLAUDE_SONNET_4,
modelId: LlmModelType.CLAUDE_SONNET_4_5,
arguments: {
max_tokens: 2000,
anthropic_version: 'bedrock-2023-05-31',
temperature: 0,
},
},
[LlmQueryType.SELECT_MOST_RELEVANT_DOMAIN]: {
modelId: LlmModelType.CLAUDE_SONNET_4,
modelId: LlmModelType.CLAUDE_SONNET_4_5,
arguments: {
max_tokens: 2000,
anthropic_version: 'bedrock-2023-05-31',
Expand Down
Loading