Skip to content

Conversation

@sebsto
Copy link
Collaborator

@sebsto sebsto commented May 28, 2025

Issue #, if available:
#15

Description of changes:

  • add claude_sonnet_v4 and claude_opus_v4 to AnthropicBedrockModels.swift

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@sebsto sebsto requested a review from Copilot May 28, 2025 21:04
@sebsto sebsto self-assigned this May 28, 2025
Copy link
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

Adds support for Claude Sonnet v4 and Opus v4 models and updates parameter configurations for an existing ClaudeV3_7Sonnet model.

  • Introduce new typealiases and static definitions for claude_sonnet_v4 and claude_opus_v4
  • Update maxTokens limit and add parameters (topP, topK, stopSequences, maxPromptSize) and features for ClaudeV3_7Sonnet
  • Include reference link to Anthropic model overview
Comments suppressed due to low confidence (5)

swift-bedrock-library/Sources/BedrockService/Models/Anthropic/AnthropicBedrockModels.swift:27

  • [nitpick] Swift typealiases should follow PascalCase without underscores; consider renaming to ClaudeSonnetV4 for consistency.
typealias Claude_Sonnet_v4 = AnthropicText

swift-bedrock-library/Sources/BedrockService/Models/Anthropic/AnthropicBedrockModels.swift:28

  • [nitpick] Swift typealiases should follow PascalCase without underscores; consider renaming to ClaudeOpusV4 for consistency.
typealias Claude_Opus_v4 = AnthropicText

swift-bedrock-library/Sources/BedrockService/Models/Anthropic/AnthropicBedrockModels.swift:186

  • [nitpick] Swift property names typically use lowerCamelCase without underscores; consider renaming to claudeSonnetV4.
public static let claude_sonnet_v4: BedrockModel = BedrockModel(

swift-bedrock-library/Sources/BedrockService/Models/Anthropic/AnthropicBedrockModels.swift:202

  • [nitpick] Swift property names typically use lowerCamelCase without underscores; consider renaming to claudeOpusV4.
public static let claude_opus_v4: BedrockModel = BedrockModel(

swift-bedrock-library/Sources/BedrockService/Models/Anthropic/AnthropicBedrockModels.swift:193

  • These lines for claude_opus_v4 are missing the '+' prefix in the diff, suggesting they weren't added correctly and could cause compile errors. Ensure diff formatting and inclusion are correct.
topP: Parameter(.topP, minValue: 0, maxValue: 1, defaultValue: 0.999),

public static let claude_opus_v4: BedrockModel = BedrockModel(
id: "us.anthropic.claude-opus-4-20250514-v1:0",
name: "Claude Opus v4",
modality: Claude_Opus_v4(
Copy link

Copilot AI May 28, 2025

Choose a reason for hiding this comment

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

The claude_opus_v4 block omits maxPromptSize, features, and maxReasoningTokens parameters present in the claude_sonnet_v4 definition; add them to maintain consistent behavior.

Copilot uses AI. Check for mistakes.
@sebsto sebsto merged commit 9071a74 into main May 28, 2025
11 checks passed
@sebsto sebsto deleted the sebsto/claudev4 branch May 28, 2025 21:15
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.

1 participant