Skip to content
Merged
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 @@ -75,9 +75,12 @@ public final class ai/koog/prompt/executor/clients/anthropic/AnthropicModels : a
public static final field Opus_4_5 Lai/koog/prompt/llm/LLModel;
public static final field Opus_4_6 Lai/koog/prompt/llm/LLModel;
public static final field Opus_4_7 Lai/koog/prompt/llm/LLModel;
public static final field Opus_4_8 Lai/koog/prompt/llm/LLModel;
public static final field Opus_5 Lai/koog/prompt/llm/LLModel;
public static final field Sonnet_4 Lai/koog/prompt/llm/LLModel;
public static final field Sonnet_4_5 Lai/koog/prompt/llm/LLModel;
public static final field Sonnet_4_6 Lai/koog/prompt/llm/LLModel;
public static final field Sonnet_5 Lai/koog/prompt/llm/LLModel;
public fun addCustomModel (Lai/koog/prompt/llm/LLModel;)V
public fun getModels ()Ljava/util/List;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,12 @@ public final class ai/koog/prompt/executor/clients/anthropic/AnthropicModels : a
public static final field Opus_4_5 Lai/koog/prompt/llm/LLModel;
public static final field Opus_4_6 Lai/koog/prompt/llm/LLModel;
public static final field Opus_4_7 Lai/koog/prompt/llm/LLModel;
public static final field Opus_4_8 Lai/koog/prompt/llm/LLModel;
public static final field Opus_5 Lai/koog/prompt/llm/LLModel;
public static final field Sonnet_4 Lai/koog/prompt/llm/LLModel;
public static final field Sonnet_4_5 Lai/koog/prompt/llm/LLModel;
public static final field Sonnet_4_6 Lai/koog/prompt/llm/LLModel;
public static final field Sonnet_5 Lai/koog/prompt/llm/LLModel;
public fun addCustomModel (Lai/koog/prompt/llm/LLModel;)V
public fun getModels ()Ljava/util/List;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,12 +275,18 @@ final object ai.koog.prompt.executor.clients.anthropic/AnthropicModels : ai.koog
final fun <get-Opus_4_6>(): ai.koog.prompt.llm/LLModel // ai.koog.prompt.executor.clients.anthropic/AnthropicModels.Opus_4_6.<get-Opus_4_6>|<get-Opus_4_6>(){}[0]
final val Opus_4_7 // ai.koog.prompt.executor.clients.anthropic/AnthropicModels.Opus_4_7|{}Opus_4_7[0]
final fun <get-Opus_4_7>(): ai.koog.prompt.llm/LLModel // ai.koog.prompt.executor.clients.anthropic/AnthropicModels.Opus_4_7.<get-Opus_4_7>|<get-Opus_4_7>(){}[0]
final val Opus_4_8 // ai.koog.prompt.executor.clients.anthropic/AnthropicModels.Opus_4_8|{}Opus_4_8[0]
final fun <get-Opus_4_8>(): ai.koog.prompt.llm/LLModel // ai.koog.prompt.executor.clients.anthropic/AnthropicModels.Opus_4_8.<get-Opus_4_8>|<get-Opus_4_8>(){}[0]
final val Opus_5 // ai.koog.prompt.executor.clients.anthropic/AnthropicModels.Opus_5|{}Opus_5[0]
final fun <get-Opus_5>(): ai.koog.prompt.llm/LLModel // ai.koog.prompt.executor.clients.anthropic/AnthropicModels.Opus_5.<get-Opus_5>|<get-Opus_5>(){}[0]
final val Sonnet_4 // ai.koog.prompt.executor.clients.anthropic/AnthropicModels.Sonnet_4|{}Sonnet_4[0]
final fun <get-Sonnet_4>(): ai.koog.prompt.llm/LLModel // ai.koog.prompt.executor.clients.anthropic/AnthropicModels.Sonnet_4.<get-Sonnet_4>|<get-Sonnet_4>(){}[0]
final val Sonnet_4_5 // ai.koog.prompt.executor.clients.anthropic/AnthropicModels.Sonnet_4_5|{}Sonnet_4_5[0]
final fun <get-Sonnet_4_5>(): ai.koog.prompt.llm/LLModel // ai.koog.prompt.executor.clients.anthropic/AnthropicModels.Sonnet_4_5.<get-Sonnet_4_5>|<get-Sonnet_4_5>(){}[0]
final val Sonnet_4_6 // ai.koog.prompt.executor.clients.anthropic/AnthropicModels.Sonnet_4_6|{}Sonnet_4_6[0]
final fun <get-Sonnet_4_6>(): ai.koog.prompt.llm/LLModel // ai.koog.prompt.executor.clients.anthropic/AnthropicModels.Sonnet_4_6.<get-Sonnet_4_6>|<get-Sonnet_4_6>(){}[0]
final val Sonnet_5 // ai.koog.prompt.executor.clients.anthropic/AnthropicModels.Sonnet_5|{}Sonnet_5[0]
final fun <get-Sonnet_5>(): ai.koog.prompt.llm/LLModel // ai.koog.prompt.executor.clients.anthropic/AnthropicModels.Sonnet_5.<get-Sonnet_5>|<get-Sonnet_5>(){}[0]
final val models // ai.koog.prompt.executor.clients.anthropic/AnthropicModels.models|{}models[0]
final fun <get-models>(): kotlin.collections/List<ai.koog.prompt.llm/LLModel> // ai.koog.prompt.executor.clients.anthropic/AnthropicModels.models.<get-models>|<get-models>(){}[0]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@ import ai.koog.prompt.executor.clients.anthropic.AnthropicModels.Opus_4_1
import ai.koog.prompt.executor.clients.anthropic.AnthropicModels.Opus_4_5
import ai.koog.prompt.executor.clients.anthropic.AnthropicModels.Opus_4_6
import ai.koog.prompt.executor.clients.anthropic.AnthropicModels.Opus_4_7
import ai.koog.prompt.executor.clients.anthropic.AnthropicModels.Opus_4_8
import ai.koog.prompt.executor.clients.anthropic.AnthropicModels.Opus_5
import ai.koog.prompt.executor.clients.anthropic.AnthropicModels.Sonnet_4
import ai.koog.prompt.executor.clients.anthropic.AnthropicModels.Sonnet_4_5
import ai.koog.prompt.executor.clients.anthropic.AnthropicModels.Sonnet_4_6
import ai.koog.prompt.executor.clients.anthropic.AnthropicModels.Sonnet_5
import ai.koog.prompt.llm.LLMCapability
import ai.koog.prompt.llm.LLMProvider
import ai.koog.prompt.llm.LLModel
Expand All @@ -27,11 +30,14 @@ import kotlin.jvm.JvmField
* | [Sonnet_4] | Fast | $3-$15 | Text, Image, Tools, Document | Text, Tools |
* | [Sonnet_4_5] | Fast | $3-$15 | Text, Image, Tools, Document | Text, Tools |
* | [Sonnet_4_6] | Fast | $3-$15 | Text, Image, Tools, Document | Text, Tools |
* | [Sonnet_5] | Fast | $3-$15 | Text, Image, Tools, Document | Text, Tools |
* | [Opus_4] | Moderately fast | $15-$75 | Text, Image, Tools, Document | Text, Tools |
* | [Opus_4_1] | Moderately fast | $15-$75 | Text, Image, Tools, Document | Text, Tools |
* | [Opus_4_5] | Moderately fast | $5-$25 | Text, Image, Tools, Document | Text, Tools |
* | [Opus_4_6] | Moderately fast | $5-$25 | Text, Image, Tools, Document | Text, Tools |
* | [Opus_4_7] | Moderately fast | $5-$25 | Text, Image, Tools, Document | Text, Tools |
* | [Opus_4_8] | Moderately fast | $5-$25 | Text, Image, Tools, Document | Text, Tools |
* | [Opus_5] | Moderately fast | $5-$25 | Text, Image, Tools, Document | Text, Tools |
*/
public object AnthropicModels : LLModelDefinitions {
/**
Expand Down Expand Up @@ -178,6 +184,37 @@ public object AnthropicModels : LLModelDefinitions {
maxOutputTokens = 64_000,
)

/**
* Claude Sonnet 5 is the first Sonnet model of Anthropic's fifth generation, delivering
* near-Opus quality on coding and agentic work at Sonnet pricing.
* Adaptive thinking is enabled by default on this model.
*
* 1M context window
* 128K max output tokens
*
* @see <a href="https://platform.claude.com/docs/en/about-claude/models/whats-new-sonnet-5">
* @see <a href="https://platform.claude.com/docs/en/about-claude/models/overview">
*/
@JvmField
public val Sonnet_5: LLModel = LLModel(
provider = LLMProvider.Anthropic,
id = "claude-sonnet-5",
capabilities = listOf(
LLMCapability.Temperature,
LLMCapability.Tools,
LLMCapability.ToolChoice,
LLMCapability.Vision.Image,
LLMCapability.Document,
LLMCapability.Completion,
LLMCapability.Schema.JSON.Basic,
LLMCapability.Schema.JSON.Standard,
LLMCapability.Thinking,
LLMCapability.PromptCaching,
),
contextLength = 1_000_000,
maxOutputTokens = 128_000,
)

/**
* Claude Opus 4 is Anthropic's previous flagship model.
* It has very high intelligence and capability.
Expand Down Expand Up @@ -325,6 +362,65 @@ public object AnthropicModels : LLModelDefinitions {
maxOutputTokens = 128_000,
)

/**
* Claude Opus 4.8 is the most capable model in the Opus 4 series — highly autonomous,
* with state-of-the-art long-horizon agentic execution, knowledge work, and memory.
*
* 1M context window
* 128K max output tokens
*
* @see <a href="https://platform.claude.com/docs/en/about-claude/models/overview">
*/
@JvmField
public val Opus_4_8: LLModel = LLModel(
provider = LLMProvider.Anthropic,
id = "claude-opus-4-8",
capabilities = listOf(
LLMCapability.Temperature,
LLMCapability.Tools,
LLMCapability.ToolChoice,
LLMCapability.Vision.Image,
LLMCapability.Document,
LLMCapability.Completion,
LLMCapability.Schema.JSON.Basic,
LLMCapability.Schema.JSON.Standard,
LLMCapability.Thinking,
LLMCapability.PromptCaching,
),
contextLength = 1_000_000,
maxOutputTokens = 128_000,
)

/**
* Claude Opus 5 is the first Opus model of Anthropic's fifth generation — a step-change over
* Opus 4.8 for complex agentic coding and enterprise work, strongest on deep reasoning and
* long-horizon tasks. Thinking is enabled by default on this model.
*
* 1M context window
* 128K max output tokens
*
* @see <a href="https://platform.claude.com/docs/en/about-claude/models/overview">
*/
@JvmField
public val Opus_5: LLModel = LLModel(
provider = LLMProvider.Anthropic,
id = "claude-opus-5",
capabilities = listOf(
LLMCapability.Temperature,
LLMCapability.Tools,
LLMCapability.ToolChoice,
LLMCapability.Vision.Image,
LLMCapability.Document,
LLMCapability.Completion,
LLMCapability.Schema.JSON.Basic,
LLMCapability.Schema.JSON.Standard,
LLMCapability.Thinking,
LLMCapability.PromptCaching,
),
contextLength = 1_000_000,
maxOutputTokens = 128_000,
)

/**
* List of the supported models by the Anthropic provider.
*/
Expand All @@ -333,11 +429,14 @@ public object AnthropicModels : LLModelDefinitions {
Sonnet_4,
Sonnet_4_5,
Sonnet_4_6,
Sonnet_5,
Opus_4,
Opus_4_1,
Opus_4_5,
Opus_4_6,
Opus_4_7,
Opus_4_8,
Opus_5,
Haiku_4_5
)

Expand All @@ -361,9 +460,12 @@ internal val DEFAULT_ANTHROPIC_MODEL_VERSIONS_MAP: Map<LLModel, String> = mapOf(
Sonnet_4 to "claude-sonnet-4-20250514",
Sonnet_4_5 to "claude-sonnet-4-5-20250929",
Sonnet_4_6 to "claude-sonnet-4-6",
Sonnet_5 to "claude-sonnet-5",
Opus_4 to "claude-opus-4-20250514",
Opus_4_1 to "claude-opus-4-1-20250805",
Opus_4_5 to "claude-opus-4-5-20251101",
Opus_4_6 to "claude-opus-4-6",
Opus_4_7 to "claude-opus-4-7",
Opus_4_8 to "claude-opus-4-8",
Opus_5 to "claude-opus-5",
)
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,12 @@ class AnthropicModelsTest {
AnthropicModels.Haiku_4_5,
AnthropicModels.Sonnet_4_5,
AnthropicModels.Sonnet_4_6,
AnthropicModels.Sonnet_5,
AnthropicModels.Opus_4_5,
AnthropicModels.Opus_4_6,
AnthropicModels.Opus_4_7,
AnthropicModels.Opus_4_8,
AnthropicModels.Opus_5,
)

modelsWithSchema.forEach { model ->
Expand Down Expand Up @@ -117,6 +120,9 @@ class AnthropicModelsTest {
assertNotNull(AnthropicModels.Sonnet_4.capabilities) shouldContain LLMCapability.Thinking
assertNotNull(AnthropicModels.Opus_4_6.capabilities) shouldContain LLMCapability.Thinking
assertNotNull(AnthropicModels.Opus_4_7.capabilities) shouldContain LLMCapability.Thinking
assertNotNull(AnthropicModels.Opus_4_8.capabilities) shouldContain LLMCapability.Thinking
assertNotNull(AnthropicModels.Opus_5.capabilities) shouldContain LLMCapability.Thinking
assertNotNull(AnthropicModels.Sonnet_5.capabilities) shouldContain LLMCapability.Thinking
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ public final class ai/koog/prompt/executor/clients/bedrock/BedrockModelFamilies$
public final class ai/koog/prompt/executor/clients/bedrock/BedrockModels : ai/koog/prompt/executor/clients/LLModelDefinitions {
public static final field INSTANCE Lai/koog/prompt/executor/clients/bedrock/BedrockModels;
public fun addCustomModel (Lai/koog/prompt/llm/LLModel;)V
public final fun getAmazonNova2Lite ()Lai/koog/prompt/llm/LLModel;
public final fun getAmazonNovaLite ()Lai/koog/prompt/llm/LLModel;
public final fun getAmazonNovaMicro ()Lai/koog/prompt/llm/LLModel;
public final fun getAmazonNovaPremier ()Lai/koog/prompt/llm/LLModel;
Expand All @@ -232,11 +233,14 @@ public final class ai/koog/prompt/executor/clients/bedrock/BedrockModels : ai/ko
public final fun getAnthropicClaude45Opus ()Lai/koog/prompt/llm/LLModel;
public final fun getAnthropicClaude46Opus ()Lai/koog/prompt/llm/LLModel;
public final fun getAnthropicClaude47Opus ()Lai/koog/prompt/llm/LLModel;
public final fun getAnthropicClaude48Opus ()Lai/koog/prompt/llm/LLModel;
public final fun getAnthropicClaude4Opus ()Lai/koog/prompt/llm/LLModel;
public final fun getAnthropicClaude4Sonnet ()Lai/koog/prompt/llm/LLModel;
public final fun getAnthropicClaude4_5Haiku ()Lai/koog/prompt/llm/LLModel;
public final fun getAnthropicClaude4_5Sonnet ()Lai/koog/prompt/llm/LLModel;
public final fun getAnthropicClaude4_6Sonnet ()Lai/koog/prompt/llm/LLModel;
public final fun getAnthropicClaude5Opus ()Lai/koog/prompt/llm/LLModel;
public final fun getAnthropicClaude5Sonnet ()Lai/koog/prompt/llm/LLModel;
public final fun getAnthropicClaudeFable5 ()Lai/koog/prompt/llm/LLModel;
public final fun getGoogleGemma3_12BIt ()Lai/koog/prompt/llm/LLModel;
public final fun getGoogleGemma3_27BIt ()Lai/koog/prompt/llm/LLModel;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,29 @@ public object BedrockModels : LLModelDefinitions {
"anthropic.claude-opus-4-7",
).effectiveModel

/**
* Claude Opus 4.8 is the most capable model in the Opus 4 series — highly autonomous,
* with state-of-the-art long-horizon agentic execution, knowledge work, and memory.
*
* @see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-cards-anthropic.html">
*/
public val AnthropicClaude48Opus: LLModel = BedrockModel(
AnthropicModels.Opus_4_8,
"anthropic.claude-opus-4-8",
).effectiveModel

/**
* Claude Opus 5 is the first Opus model of Anthropic's fifth generation — a step-change over
* Opus 4.8 for complex agentic coding and enterprise work, strongest on deep reasoning and
* long-horizon tasks. Thinking is enabled by default on this model.
*
* @see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-anthropic-claude-opus-5.html">
*/
public val AnthropicClaude5Opus: LLModel = BedrockModel(
AnthropicModels.Opus_5,
"anthropic.claude-opus-5",
).effectiveModel

/**
* Claude Fable 5 is Anthropic's most capable widely released model, built for the most demanding
* reasoning and long-horizon agentic work.
Expand Down Expand Up @@ -253,6 +276,18 @@ public object BedrockModels : LLModelDefinitions {
"anthropic.claude-sonnet-4-6",
).effectiveModel

/**
* Claude Sonnet 5 is the first Sonnet model of Anthropic's fifth generation, delivering
* near-Opus quality on coding and agentic work at Sonnet pricing.
* Adaptive thinking is enabled by default on this model.
*
* @see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-anthropic-claude-sonnet-5.html">
*/
public val AnthropicClaude5Sonnet: LLModel = BedrockModel(
AnthropicModels.Sonnet_5,
"anthropic.claude-sonnet-5",
).effectiveModel

/**
* Claude Haiku 4.5 - Anthropic's most powerful model for powering real-world agents,
* with industry-leading capabilities around coding, and computer use.
Expand Down Expand Up @@ -350,6 +385,30 @@ public object BedrockModels : LLModelDefinitions {
),
).effectiveModel

/**
* Amazon Nova 2 Lite - Fast, cost-effective reasoning model for everyday workloads
*
* Part of the Amazon Nova 2 family announced at re:Invent 2025:
* - Extended thinking with three intensity levels (low, medium, high)
* - 1M token context window
* - Multimodal understanding (text, image, video)
* - Tool/function calling support
*
* @see <a href="https://aws.amazon.com/about-aws/whats-new/2025/12/nova-2-foundation-models-amazon-bedrock">
*/
public val AmazonNova2Lite: LLModel = BedrockModel(
LLModel(
provider = LLMProvider.Bedrock,
id = "amazon.nova-2-lite-v1:0",
capabilities = novaCapabilities + listOf(
LLMCapability.Vision.Image,
LLMCapability.Vision.Video,
LLMCapability.Thinking,
),
contextLength = 1_000_000,
),
).effectiveModel

/**
* Meta's Llama 3 8B Instruct
*
Expand Down Expand Up @@ -859,23 +918,27 @@ public object BedrockModels : LLModelDefinitions {
* List of the supported models by the Bedrock provider.
*/
private val supportedModels: List<LLModel> = listOf(
// Claude 4 Series
// Claude Series
AnthropicClaude4Opus,
AnthropicClaude41Opus,
AnthropicClaude45Opus,
AnthropicClaude46Opus,
AnthropicClaude47Opus,
AnthropicClaude48Opus,
AnthropicClaude5Opus,
AnthropicClaudeFable5,
AnthropicClaude4Sonnet,
AnthropicClaude4_5Sonnet,
AnthropicClaude4_6Sonnet,
AnthropicClaude5Sonnet,
AnthropicClaude4_5Haiku,

// Amazon Nova Series
AmazonNovaMicro,
AmazonNovaLite,
AmazonNovaPro,
AmazonNovaPremier,
AmazonNova2Lite,

// Meta Llama 3.0 Series
MetaLlama3_0_8BInstruct,
Expand Down
Loading
Loading