From c0bc332dcbe2878c82dbbaf2def547297887048d Mon Sep 17 00:00:00 2001 From: Kiro Agent <244629292+kiro-agent@users.noreply.github.com> Date: Tue, 21 Apr 2026 04:56:21 +0000 Subject: [PATCH 1/2] feat: add all missing Bedrock text generation models Add 19 new model definitions across 8 vendors: - Claude 3 (Haiku, Opus, Sonnet), Claude 3.5 (Haiku, Sonnet v1, Sonnet v2) - Cohere Command R, Command R+ v2 - Mistral Large 2, Mistral Small - Writer Palmyra X4, Palmyra X5 (new vendor) - Meta Llama 3 (70B, 8B) - Amazon Titan Text (Express, Lite, Premier) (new vendor) - AI21 Jamba (1.5 Large, 1.5 Mini, Instruct) (new vendor) Updated all model registries: vendor files, mod.rs tests, lib.rs re-exports, and model_verification.rs example. Co-authored-by: Aaron Longwell <27492+adlio@users.noreply.github.com> --- mixtape-core/examples/model_verification.rs | 172 +++++++++++++++++++- mixtape-core/src/lib.rs | 15 +- mixtape-core/src/models/ai21.rs | 33 ++++ mixtape-core/src/models/claude.rs | 78 +++++++++ mixtape-core/src/models/cohere.rs | 20 +++ mixtape-core/src/models/llama.rs | 24 +++ mixtape-core/src/models/mistral.rs | 20 +++ mixtape-core/src/models/mod.rs | 64 ++++++++ mixtape-core/src/models/titan.rs | 33 ++++ mixtape-core/src/models/writer.rs | 23 +++ 10 files changed, 471 insertions(+), 11 deletions(-) create mode 100644 mixtape-core/src/models/ai21.rs create mode 100644 mixtape-core/src/models/titan.rs create mode 100644 mixtape-core/src/models/writer.rs diff --git a/mixtape-core/examples/model_verification.rs b/mixtape-core/examples/model_verification.rs index fa70365..5e07172 100644 --- a/mixtape-core/examples/model_verification.rs +++ b/mixtape-core/examples/model_verification.rs @@ -134,7 +134,45 @@ struct ModelInfo { /// All available models for testing const MODELS: &[ModelInfo] = &[ - // Anthropic Claude + // Anthropic Claude 3 + ModelInfo { + key: "Claude3Haiku", + name: "Claude 3 Haiku", + vendor: "anthropic", + supports_tools: true, + }, + ModelInfo { + key: "Claude3Opus", + name: "Claude 3 Opus", + vendor: "anthropic", + supports_tools: true, + }, + ModelInfo { + key: "Claude3Sonnet", + name: "Claude 3 Sonnet", + vendor: "anthropic", + supports_tools: true, + }, + // Anthropic Claude 3.5 + ModelInfo { + key: "Claude3_5Haiku", + name: "Claude 3.5 Haiku", + vendor: "anthropic", + supports_tools: true, + }, + ModelInfo { + key: "Claude3_5SonnetV1", + name: "Claude 3.5 Sonnet v1", + vendor: "anthropic", + supports_tools: true, + }, + ModelInfo { + key: "Claude3_5SonnetV2", + name: "Claude 3.5 Sonnet v2", + vendor: "anthropic", + supports_tools: true, + }, + // Anthropic Claude 3.7+ ModelInfo { key: "Claude3_7Sonnet", name: "Claude 3.7 Sonnet", @@ -220,7 +258,38 @@ const MODELS: &[ModelInfo] = &[ vendor: "amazon", supports_tools: true, }, + // Amazon Titan + ModelInfo { + key: "TitanTextExpress", + name: "Titan Text Express", + vendor: "amazon", + supports_tools: false, + }, + ModelInfo { + key: "TitanTextLite", + name: "Titan Text Lite", + vendor: "amazon", + supports_tools: false, + }, + ModelInfo { + key: "TitanTextPremier", + name: "Titan Text Premier", + vendor: "amazon", + supports_tools: false, + }, // Mistral + ModelInfo { + key: "MistralLarge2", + name: "Mistral Large 2", + vendor: "mistral", + supports_tools: true, + }, + ModelInfo { + key: "MistralSmall", + name: "Mistral Small", + vendor: "mistral", + supports_tools: true, + }, ModelInfo { key: "MistralLarge3", name: "Mistral Large 3", @@ -270,12 +339,24 @@ const MODELS: &[ModelInfo] = &[ supports_tools: true, }, // Cohere + ModelInfo { + key: "CohereCommandR", + name: "Command R", + vendor: "cohere", + supports_tools: true, + }, ModelInfo { key: "CohereCommandRPlus", name: "Command R+", vendor: "cohere", supports_tools: true, }, + ModelInfo { + key: "CohereCommandRPlusV2", + name: "Command R+ v2", + vendor: "cohere", + supports_tools: true, + }, // Qwen ModelInfo { key: "Qwen3_235B", @@ -428,6 +509,51 @@ const MODELS: &[ModelInfo] = &[ vendor: "meta", supports_tools: true, }, + // Meta Llama 3 + ModelInfo { + key: "Llama3_70B", + name: "Llama 3 70B", + vendor: "meta", + supports_tools: true, + }, + ModelInfo { + key: "Llama3_8B", + name: "Llama 3 8B", + vendor: "meta", + supports_tools: true, + }, + // Writer + ModelInfo { + key: "WriterPalmyraX4", + name: "Palmyra X4", + vendor: "writer", + supports_tools: true, + }, + ModelInfo { + key: "WriterPalmyraX5", + name: "Palmyra X5", + vendor: "writer", + supports_tools: true, + }, + // AI21 + ModelInfo { + key: "AI21Jamba1_5Large", + name: "Jamba 1.5 Large", + vendor: "ai21", + supports_tools: false, + }, + ModelInfo { + key: "AI21Jamba1_5Mini", + name: "Jamba 1.5 Mini", + vendor: "ai21", + supports_tools: false, + }, + ModelInfo { + key: "AI21JambaInstruct", + name: "Jamba Instruct", + vendor: "ai21", + supports_tools: false, + }, ]; // ============================================================================= @@ -478,6 +604,12 @@ async fn create_provider(key: &str) -> Option> { bedrock_provider_match!( key, // Anthropic Claude + Claude3Haiku, + Claude3Opus, + Claude3Sonnet, + Claude3_5Haiku, + Claude3_5SonnetV1, + Claude3_5SonnetV2, Claude3_7Sonnet, ClaudeOpus4, ClaudeOpus4_1, @@ -485,6 +617,7 @@ async fn create_provider(key: &str) -> Option> { ClaudeOpus4_6, ClaudeSonnet4, ClaudeSonnet4_5, + ClaudeSonnet4_6, ClaudeHaiku4_5, // Amazon Nova NovaMicro, @@ -493,7 +626,13 @@ async fn create_provider(key: &str) -> Option> { NovaPro, NovaPremier, Nova2Sonic, + // Amazon Titan + TitanTextExpress, + TitanTextLite, + TitanTextPremier, // Mistral + MistralLarge2, + MistralSmall, MistralLarge3, MagistralSmall, Ministral3B, @@ -503,7 +642,9 @@ async fn create_provider(key: &str) -> Option> { VoxtralMini3B, VoxtralSmall24B, // Cohere + CohereCommandR, CohereCommandRPlus, + CohereCommandRPlusV2, // Alibaba Qwen Qwen3_235B, Qwen3Coder480B, @@ -533,6 +674,15 @@ async fn create_provider(key: &str) -> Option> { Llama3_1_405B, Llama3_1_70B, Llama3_1_8B, + Llama3_70B, + Llama3_8B, + // Writer + WriterPalmyraX4, + WriterPalmyraX5, + // AI21 + AI21Jamba1_5Large, + AI21Jamba1_5Mini, + AI21JambaInstruct, ) } @@ -601,15 +751,20 @@ OPTIONS: --models Comma-separated list of model keys to test VENDORS (model creators, all accessed via AWS Bedrock): - anthropic, amazon, mistral, cohere, qwen, google, deepseek, moonshot, meta + anthropic, amazon, mistral, cohere, qwen, google, deepseek, moonshot, meta, writer, ai21 MODELS: - Claude: Claude3_7Sonnet, ClaudeOpus4, ClaudeSonnet4, ClaudeSonnet4_5, - ClaudeHaiku4_5, ClaudeOpus4_5, ClaudeOpus4_1, ClaudeOpus4_6 + Claude 3: Claude3Haiku, Claude3Opus, Claude3Sonnet + Claude 3.5: Claude3_5Haiku, Claude3_5SonnetV1, Claude3_5SonnetV2 + Claude 3.7+: Claude3_7Sonnet, ClaudeOpus4, ClaudeSonnet4, ClaudeSonnet4_5, + ClaudeHaiku4_5, ClaudeOpus4_5, ClaudeOpus4_1, ClaudeOpus4_6, + ClaudeSonnet4_6 Nova: NovaMicro, NovaLite, Nova2Lite, NovaPro, NovaPremier, Nova2Sonic - Mistral: MistralLarge3, MagistralSmall, Ministral3B, Ministral8B, - Ministral14B, PixtralLarge, VoxtralMini3B, VoxtralSmall24B - Cohere: CohereCommandRPlus + Titan: TitanTextExpress, TitanTextLite, TitanTextPremier + Mistral: MistralLarge2, MistralSmall, MistralLarge3, MagistralSmall, + Ministral3B, Ministral8B, Ministral14B, PixtralLarge, + VoxtralMini3B, VoxtralSmall24B + Cohere: CohereCommandR, CohereCommandRPlus, CohereCommandRPlusV2 Qwen: Qwen3_235B, Qwen3Coder480B, Qwen3_32B, Qwen3Coder30B, Qwen3Next80B, Qwen3VL235B Google: Gemma3_27B, Gemma3_12B, Gemma3_4B @@ -619,6 +774,9 @@ MODELS: Llama 3.3: Llama3_3_70B Llama 3.2: Llama3_2_90B, Llama3_2_11B, Llama3_2_3B, Llama3_2_1B Llama 3.1: Llama3_1_405B, Llama3_1_70B, Llama3_1_8B + Llama 3: Llama3_70B, Llama3_8B + Writer: WriterPalmyraX4, WriterPalmyraX5 + AI21: AI21Jamba1_5Large, AI21Jamba1_5Mini, AI21JambaInstruct EXAMPLES: # Run all models diff --git a/mixtape-core/src/lib.rs b/mixtape-core/src/lib.rs index e41af8d..8c4470c 100644 --- a/mixtape-core/src/lib.rs +++ b/mixtape-core/src/lib.rs @@ -184,13 +184,18 @@ pub use provider::BedrockProvider; // Anthropic Claude pub use models::{ + Claude3Haiku, Claude3Opus, Claude3Sonnet, Claude3_5Haiku, Claude3_5SonnetV1, Claude3_5SonnetV2, Claude3_7Sonnet, ClaudeHaiku4_5, ClaudeOpus4, ClaudeOpus4_1, ClaudeOpus4_5, ClaudeOpus4_6, ClaudeSonnet4, ClaudeSonnet4_5, ClaudeSonnet4_6, }; // Amazon Nova pub use models::{Nova2Lite, Nova2Sonic, NovaLite, NovaMicro, NovaPremier, NovaPro}; +// Amazon Titan +pub use models::{TitanTextExpress, TitanTextLite, TitanTextPremier}; +// AI21 Labs +pub use models::{AI21Jamba1_5Large, AI21Jamba1_5Mini, AI21JambaInstruct}; // Cohere -pub use models::CohereCommandRPlus; +pub use models::{CohereCommandR, CohereCommandRPlus, CohereCommandRPlusV2}; // DeepSeek pub use models::{DeepSeekR1, DeepSeekV3_1, DeepSeekV3_2}; // Z.AI GLM @@ -200,14 +205,14 @@ pub use models::{Gemma3_12B, Gemma3_27B, Gemma3_4B}; // Meta Llama pub use models::{ Llama3_1_405B, Llama3_1_70B, Llama3_1_8B, Llama3_2_11B, Llama3_2_1B, Llama3_2_3B, Llama3_2_90B, - Llama3_3_70B, Llama4Maverick17B, Llama4Scout17B, + Llama3_3_70B, Llama3_70B, Llama3_8B, Llama4Maverick17B, Llama4Scout17B, }; // MiniMax pub use models::MiniMaxM2_1; // Mistral pub use models::{ - MagistralSmall, Ministral14B, Ministral3B, Ministral8B, MistralLarge3, PixtralLarge, - VoxtralMini3B, VoxtralSmall24B, + MagistralSmall, Ministral14B, Ministral3B, Ministral8B, MistralLarge2, MistralLarge3, + MistralSmall, PixtralLarge, VoxtralMini3B, VoxtralSmall24B, }; // Moonshot Kimi pub use models::{KimiK2Thinking, KimiK2_5}; @@ -215,6 +220,8 @@ pub use models::{KimiK2Thinking, KimiK2_5}; pub use models::{ Qwen3Coder30B, Qwen3Coder480B, Qwen3CoderNext, Qwen3Next80B, Qwen3VL235B, Qwen3_235B, Qwen3_32B, }; +// Writer AI Palmyra +pub use models::{WriterPalmyraX4, WriterPalmyraX5}; pub use tokenizer::CharacterTokenizer; pub use tool::{box_tool, DocumentFormat, DynTool, ImageFormat, Tool, ToolError, ToolResult}; diff --git a/mixtape-core/src/models/ai21.rs b/mixtape-core/src/models/ai21.rs new file mode 100644 index 0000000..bb7307f --- /dev/null +++ b/mixtape-core/src/models/ai21.rs @@ -0,0 +1,33 @@ +//! AI21 Labs Jamba models + +use super::define_model; + +define_model!( + /// Jamba 1.5 Large - Large hybrid SSM-Transformer model + AI21Jamba1_5Large { + display_name: "Jamba 1.5 Large", + bedrock_id: "ai21.jamba-1-5-large-v1:0", + context_tokens: 256_000, + output_tokens: 4_096 + } +); + +define_model!( + /// Jamba 1.5 Mini - Compact hybrid SSM-Transformer model + AI21Jamba1_5Mini { + display_name: "Jamba 1.5 Mini", + bedrock_id: "ai21.jamba-1-5-mini-v1:0", + context_tokens: 256_000, + output_tokens: 4_096 + } +); + +define_model!( + /// Jamba Instruct - Instruction-tuned hybrid model + AI21JambaInstruct { + display_name: "Jamba Instruct", + bedrock_id: "ai21.jamba-instruct-v1:0", + context_tokens: 256_000, + output_tokens: 4_096 + } +); diff --git a/mixtape-core/src/models/claude.rs b/mixtape-core/src/models/claude.rs index 635c9cb..c32d25d 100644 --- a/mixtape-core/src/models/claude.rs +++ b/mixtape-core/src/models/claude.rs @@ -3,6 +3,84 @@ use super::define_model; use crate::model::InferenceProfile; +// ============================================================================= +// Claude 3 Models +// ============================================================================= + +define_model!( + /// Claude 3 Haiku - Fast, compact model for quick responses + Claude3Haiku { + display_name: "Claude 3 Haiku", + bedrock_id: "anthropic.claude-3-haiku-20240307-v1:0", + context_tokens: 200_000, + output_tokens: 4_096, + anthropic_id: "claude-3-haiku-20240307" + } +); + +define_model!( + /// Claude 3 Opus - Most capable Claude 3 model + Claude3Opus { + display_name: "Claude 3 Opus", + bedrock_id: "anthropic.claude-3-opus-20240229-v1:0", + context_tokens: 200_000, + output_tokens: 4_096, + anthropic_id: "claude-3-opus-20240229" + } +); + +define_model!( + /// Claude 3 Sonnet - Balanced Claude 3 model + Claude3Sonnet { + display_name: "Claude 3 Sonnet", + bedrock_id: "anthropic.claude-3-sonnet-20240229-v1:0", + context_tokens: 200_000, + output_tokens: 4_096, + anthropic_id: "claude-3-sonnet-20240229" + } +); + +// ============================================================================= +// Claude 3.5 Models +// ============================================================================= + +define_model!( + /// Claude 3.5 Haiku - Fast, efficient model + Claude3_5Haiku { + display_name: "Claude 3.5 Haiku", + bedrock_id: "anthropic.claude-3-5-haiku-20241022-v1:0", + context_tokens: 200_000, + output_tokens: 8_192, + anthropic_id: "claude-3-5-haiku-20241022" + } +); + +define_model!( + /// Claude 3.5 Sonnet v1 - First Claude 3.5 Sonnet release + Claude3_5SonnetV1 { + display_name: "Claude 3.5 Sonnet v1", + bedrock_id: "anthropic.claude-3-5-sonnet-20240620-v1:0", + context_tokens: 200_000, + output_tokens: 8_192, + anthropic_id: "claude-3-5-sonnet-20240620" + } +); + +define_model!( + /// Claude 3.5 Sonnet v2 - Updated Claude 3.5 Sonnet with improvements + Claude3_5SonnetV2 { + display_name: "Claude 3.5 Sonnet v2", + bedrock_id: "anthropic.claude-3-5-sonnet-20241022-v2:0", + context_tokens: 200_000, + output_tokens: 8_192, + anthropic_id: "claude-3-5-sonnet-20241022" + } +); + +// ============================================================================= +// Claude 3.7 Models +// ============================================================================= + define_model!( /// Claude 3.7 Sonnet - Latest Claude 3.x with improved reasoning Claude3_7Sonnet { diff --git a/mixtape-core/src/models/cohere.rs b/mixtape-core/src/models/cohere.rs index b3a1788..f18ffcf 100644 --- a/mixtape-core/src/models/cohere.rs +++ b/mixtape-core/src/models/cohere.rs @@ -2,6 +2,16 @@ use super::define_model; +define_model!( + /// Command R - Scalable model for RAG and tool use + CohereCommandR { + display_name: "Command R", + bedrock_id: "cohere.command-r-v1:0", + context_tokens: 128_000, + output_tokens: 4_096 + } +); + define_model!( /// Command R+ - Enterprise RAG and multi-step tool use model CohereCommandRPlus { @@ -11,3 +21,13 @@ define_model!( output_tokens: 4_096 } ); + +define_model!( + /// Command R+ v2 - Updated enterprise RAG model + CohereCommandRPlusV2 { + display_name: "Command R+ v2", + bedrock_id: "cohere.command-r-plus-v2:0", + context_tokens: 128_000, + output_tokens: 4_096 + } +); diff --git a/mixtape-core/src/models/llama.rs b/mixtape-core/src/models/llama.rs index 25096d1..f434956 100644 --- a/mixtape-core/src/models/llama.rs +++ b/mixtape-core/src/models/llama.rs @@ -84,6 +84,30 @@ define_model!( } ); +// ============================================================================= +// Llama 3 Models +// ============================================================================= + +define_model!( + /// Llama 3 70B Instruct - Large instruction-tuned model + Llama3_70B { + display_name: "Llama 3 70B", + bedrock_id: "meta.llama3-70b-instruct-v1:0", + context_tokens: 8_000, + output_tokens: 2_048 + } +); + +define_model!( + /// Llama 3 8B Instruct - Compact instruction-tuned model + Llama3_8B { + display_name: "Llama 3 8B", + bedrock_id: "meta.llama3-8b-instruct-v1:0", + context_tokens: 8_000, + output_tokens: 2_048 + } +); + // ============================================================================= // Llama 3.1 Models // ============================================================================= diff --git a/mixtape-core/src/models/mistral.rs b/mixtape-core/src/models/mistral.rs index 577361d..9810679 100644 --- a/mixtape-core/src/models/mistral.rs +++ b/mixtape-core/src/models/mistral.rs @@ -2,6 +2,26 @@ use super::define_model; +define_model!( + /// Mistral Large 2 - Previous generation flagship model + MistralLarge2 { + display_name: "Mistral Large 2", + bedrock_id: "mistral.mistral-large-2407-v1:0", + context_tokens: 128_000, + output_tokens: 8_192 + } +); + +define_model!( + /// Mistral Small - Compact instruction model + MistralSmall { + display_name: "Mistral Small", + bedrock_id: "mistral.mistral-small-2402-v1:0", + context_tokens: 32_000, + output_tokens: 8_192 + } +); + define_model!( /// Mistral Large 3 - Flagship 675B MoE model with 41B active parameters MistralLarge3 { diff --git a/mixtape-core/src/models/mod.rs b/mixtape-core/src/models/mod.rs index db8b810..1260e68 100644 --- a/mixtape-core/src/models/mod.rs +++ b/mixtape-core/src/models/mod.rs @@ -5,6 +5,7 @@ //! like `BedrockModel` or `AnthropicModel`. //! //! Models are organized by vendor: +//! - `ai21` - AI21 Labs Jamba models //! - `claude` - Anthropic Claude models //! - `cohere` - Cohere models //! - `deepseek` - DeepSeek models @@ -16,7 +17,10 @@ //! - `mistral` - Mistral AI models //! - `nova` - Amazon Nova models //! - `qwen` - Alibaba Qwen models +//! - `titan` - Amazon Titan Text models +//! - `writer` - Writer AI Palmyra models +mod ai21; mod claude; mod cohere; mod deepseek; @@ -28,8 +32,11 @@ mod minimax; mod mistral; mod nova; mod qwen; +mod titan; +mod writer; // Re-export all models at the module level +pub use ai21::*; pub use claude::*; pub use cohere::*; pub use deepseek::*; @@ -41,6 +48,8 @@ pub use minimax::*; pub use mistral::*; pub use nova::*; pub use qwen::*; +pub use titan::*; +pub use writer::*; /// Macro to generate model structs with trait implementations /// @@ -163,6 +172,13 @@ mod tests { fn test_model_ids_are_valid() { // Verify model ID format (no spaces, valid characters) let models: Vec<&dyn BedrockModel> = vec![ + // Anthropic Claude + &Claude3Haiku, + &Claude3Opus, + &Claude3Sonnet, + &Claude3_5Haiku, + &Claude3_5SonnetV1, + &Claude3_5SonnetV2, &Claude3_7Sonnet, &ClaudeOpus4, &ClaudeSonnet4, @@ -172,12 +188,20 @@ mod tests { &ClaudeOpus4_5, &ClaudeOpus4_1, &ClaudeOpus4_6, + // Amazon Nova &NovaMicro, &NovaLite, &Nova2Lite, &NovaPro, &NovaPremier, &Nova2Sonic, + // Amazon Titan + &TitanTextExpress, + &TitanTextLite, + &TitanTextPremier, + // Mistral + &MistralLarge2, + &MistralSmall, &MistralLarge3, &MagistralSmall, &Ministral3B, @@ -186,7 +210,11 @@ mod tests { &PixtralLarge, &VoxtralMini3B, &VoxtralSmall24B, + // Cohere + &CohereCommandR, &CohereCommandRPlus, + &CohereCommandRPlusV2, + // Qwen &Qwen3_235B, &Qwen3Coder480B, &Qwen3_32B, @@ -194,17 +222,23 @@ mod tests { &Qwen3Next80B, &Qwen3VL235B, &Qwen3CoderNext, + // Z.AI GLM &GLM4_7, &GLM4_7Flash, + // Google &Gemma3_27B, &Gemma3_12B, &Gemma3_4B, + // DeepSeek &DeepSeekR1, &DeepSeekV3_1, &DeepSeekV3_2, + // Moonshot Kimi &KimiK2Thinking, &KimiK2_5, + // MiniMax &MiniMaxM2_1, + // Meta Llama &Llama4Scout17B, &Llama4Maverick17B, &Llama3_3_70B, @@ -215,6 +249,15 @@ mod tests { &Llama3_1_405B, &Llama3_1_70B, &Llama3_1_8B, + &Llama3_70B, + &Llama3_8B, + // Writer + &WriterPalmyraX4, + &WriterPalmyraX5, + // AI21 + &AI21Jamba1_5Large, + &AI21Jamba1_5Mini, + &AI21JambaInstruct, ]; for model in models { @@ -262,15 +305,36 @@ mod tests { fn test_default_inference_profile_models() { // Models without an explicit profile should return None (the default) let default_models: Vec<&dyn BedrockModel> = vec![ + &Claude3Haiku, + &Claude3Opus, + &Claude3Sonnet, + &Claude3_5Haiku, + &Claude3_5SonnetV1, + &Claude3_5SonnetV2, &Claude3_7Sonnet, &NovaMicro, &NovaLite, &NovaPro, &NovaPremier, + &TitanTextExpress, + &TitanTextLite, + &TitanTextPremier, + &MistralLarge2, + &MistralSmall, &MistralLarge3, &Gemma3_27B, &DeepSeekR1, &KimiK2Thinking, + &CohereCommandR, + &CohereCommandRPlus, + &CohereCommandRPlusV2, + &WriterPalmyraX4, + &WriterPalmyraX5, + &AI21Jamba1_5Large, + &AI21Jamba1_5Mini, + &AI21JambaInstruct, + &Llama3_70B, + &Llama3_8B, ]; for model in default_models { diff --git a/mixtape-core/src/models/titan.rs b/mixtape-core/src/models/titan.rs new file mode 100644 index 0000000..dc9c4b3 --- /dev/null +++ b/mixtape-core/src/models/titan.rs @@ -0,0 +1,33 @@ +//! Amazon Titan Text models + +use super::define_model; + +define_model!( + /// Titan Text Express - Fast general-purpose text model + TitanTextExpress { + display_name: "Titan Text Express", + bedrock_id: "amazon.titan-text-express-v1", + context_tokens: 8_000, + output_tokens: 8_192 + } +); + +define_model!( + /// Titan Text Lite - Lightweight text model for simple tasks + TitanTextLite { + display_name: "Titan Text Lite", + bedrock_id: "amazon.titan-text-lite-v1", + context_tokens: 4_000, + output_tokens: 4_096 + } +); + +define_model!( + /// Titan Text Premier - High-capability text model + TitanTextPremier { + display_name: "Titan Text Premier", + bedrock_id: "amazon.titan-text-premier-v1:0", + context_tokens: 32_000, + output_tokens: 8_192 + } +); diff --git a/mixtape-core/src/models/writer.rs b/mixtape-core/src/models/writer.rs new file mode 100644 index 0000000..66855e7 --- /dev/null +++ b/mixtape-core/src/models/writer.rs @@ -0,0 +1,23 @@ +//! Writer AI Palmyra models + +use super::define_model; + +define_model!( + /// Palmyra X4 - Enterprise language model from Writer + WriterPalmyraX4 { + display_name: "Palmyra X4", + bedrock_id: "writer.palmyra-x4-v1:0", + context_tokens: 128_000, + output_tokens: 8_192 + } +); + +define_model!( + /// Palmyra X5 - Latest enterprise language model from Writer + WriterPalmyraX5 { + display_name: "Palmyra X5", + bedrock_id: "writer.palmyra-x5-v1:0", + context_tokens: 128_000, + output_tokens: 8_192 + } +); From 8447043fdc4955b88d548dc36eeae59bba376b05 Mon Sep 17 00:00:00 2001 From: Kiro Agent <244629292+kiro-agent@users.noreply.github.com> Date: Tue, 21 Apr 2026 05:11:19 +0000 Subject: [PATCH 2/2] feat: add remaining missing Bedrock models Add 13 new models across 6 vendors: - Z.AI: GLM 5 - MiniMax: M2, M2.5 - NVIDIA: Nemotron Nano 2, Nemotron Nano 2 VL, Nemotron 3 Nano 30B A3B, Nemotron 3 Super 120B A12B - OpenAI: GPT OSS 20B, GPT OSS 120B, GPT OSS Safeguard 20B, GPT OSS Safeguard 120B - Mistral: Devstral 2 135B - Writer: Palmyra Vision 7B Create new vendor files nvidia.rs and openai.rs. Wire up all models in mod.rs, lib.rs, and model_verification.rs. Co-authored-by: Aaron Longwell <27492+adlio@users.noreply.github.com> --- mixtape-core/examples/model_verification.rs | 131 +++++++++++++++++++- mixtape-core/src/lib.rs | 14 ++- mixtape-core/src/models/glm.rs | 10 ++ mixtape-core/src/models/minimax.rs | 20 +++ mixtape-core/src/models/mistral.rs | 10 ++ mixtape-core/src/models/mod.rs | 21 ++++ mixtape-core/src/models/nvidia.rs | 43 +++++++ mixtape-core/src/models/openai.rs | 43 +++++++ mixtape-core/src/models/writer.rs | 10 ++ 9 files changed, 294 insertions(+), 8 deletions(-) create mode 100644 mixtape-core/src/models/nvidia.rs create mode 100644 mixtape-core/src/models/openai.rs diff --git a/mixtape-core/examples/model_verification.rs b/mixtape-core/examples/model_verification.rs index 5e07172..92828c5 100644 --- a/mixtape-core/examples/model_verification.rs +++ b/mixtape-core/examples/model_verification.rs @@ -338,6 +338,12 @@ const MODELS: &[ModelInfo] = &[ vendor: "mistral", supports_tools: true, }, + ModelInfo { + key: "Devstral2_135B", + name: "Devstral 2 135B", + vendor: "mistral", + supports_tools: true, + }, // Cohere ModelInfo { key: "CohereCommandR", @@ -445,6 +451,94 @@ const MODELS: &[ModelInfo] = &[ vendor: "moonshot", supports_tools: true, }, + // Z.AI GLM + ModelInfo { + key: "GLM4_7", + name: "GLM 4.7", + vendor: "zai", + supports_tools: true, + }, + ModelInfo { + key: "GLM4_7Flash", + name: "GLM 4.7 Flash", + vendor: "zai", + supports_tools: true, + }, + ModelInfo { + key: "GLM5", + name: "GLM 5", + vendor: "zai", + supports_tools: true, + }, + // MiniMax + ModelInfo { + key: "MiniMaxM2_1", + name: "MiniMax M2.1", + vendor: "minimax", + supports_tools: true, + }, + ModelInfo { + key: "MiniMaxM2", + name: "MiniMax M2", + vendor: "minimax", + supports_tools: true, + }, + ModelInfo { + key: "MiniMaxM2_5", + name: "MiniMax M2.5", + vendor: "minimax", + supports_tools: true, + }, + // NVIDIA + ModelInfo { + key: "NemotronNano2", + name: "Nemotron Nano 2", + vendor: "nvidia", + supports_tools: true, + }, + ModelInfo { + key: "NemotronNano2VL", + name: "Nemotron Nano 2 VL", + vendor: "nvidia", + supports_tools: true, + }, + ModelInfo { + key: "Nemotron3Nano30BA3B", + name: "Nemotron 3 Nano 30B A3B", + vendor: "nvidia", + supports_tools: true, + }, + ModelInfo { + key: "Nemotron3Super120BA12B", + name: "Nemotron 3 Super 120B A12B", + vendor: "nvidia", + supports_tools: true, + }, + // OpenAI + ModelInfo { + key: "GptOss20B", + name: "GPT OSS 20B", + vendor: "openai", + supports_tools: true, + }, + ModelInfo { + key: "GptOss120B", + name: "GPT OSS 120B", + vendor: "openai", + supports_tools: true, + }, + ModelInfo { + key: "GptOssSafeguard20B", + name: "GPT OSS Safeguard 20B", + vendor: "openai", + supports_tools: false, + }, + ModelInfo { + key: "GptOssSafeguard120B", + name: "GPT OSS Safeguard 120B", + vendor: "openai", + supports_tools: false, + }, // Meta Llama 4 ModelInfo { key: "Llama4Scout17B", @@ -535,6 +629,12 @@ const MODELS: &[ModelInfo] = &[ vendor: "writer", supports_tools: true, }, + ModelInfo { + key: "WriterPalmyraVision7B", + name: "Palmyra Vision 7B", + vendor: "writer", + supports_tools: true, + }, // AI21 ModelInfo { key: "AI21Jamba1_5Large", @@ -641,6 +741,7 @@ async fn create_provider(key: &str) -> Option> { PixtralLarge, VoxtralMini3B, VoxtralSmall24B, + Devstral2_135B, // Cohere CohereCommandR, CohereCommandRPlus, @@ -663,6 +764,24 @@ async fn create_provider(key: &str) -> Option> { // Moonshot KimiK2Thinking, KimiK2_5, + // Z.AI GLM + GLM4_7, + GLM4_7Flash, + GLM5, + // MiniMax + MiniMaxM2_1, + MiniMaxM2, + MiniMaxM2_5, + // NVIDIA + NemotronNano2, + NemotronNano2VL, + Nemotron3Nano30BA3B, + Nemotron3Super120BA12B, + // OpenAI + GptOss20B, + GptOss120B, + GptOssSafeguard20B, + GptOssSafeguard120B, // Meta Llama Llama4Scout17B, Llama4Maverick17B, @@ -679,6 +798,7 @@ async fn create_provider(key: &str) -> Option> { // Writer WriterPalmyraX4, WriterPalmyraX5, + WriterPalmyraVision7B, // AI21 AI21Jamba1_5Large, AI21Jamba1_5Mini, @@ -751,7 +871,7 @@ OPTIONS: --models Comma-separated list of model keys to test VENDORS (model creators, all accessed via AWS Bedrock): - anthropic, amazon, mistral, cohere, qwen, google, deepseek, moonshot, meta, writer, ai21 + anthropic, amazon, mistral, cohere, qwen, google, deepseek, moonshot, zai, minimax, nvidia, openai, meta, writer, ai21 MODELS: Claude 3: Claude3Haiku, Claude3Opus, Claude3Sonnet @@ -763,19 +883,24 @@ MODELS: Titan: TitanTextExpress, TitanTextLite, TitanTextPremier Mistral: MistralLarge2, MistralSmall, MistralLarge3, MagistralSmall, Ministral3B, Ministral8B, Ministral14B, PixtralLarge, - VoxtralMini3B, VoxtralSmall24B + VoxtralMini3B, VoxtralSmall24B, Devstral2_135B Cohere: CohereCommandR, CohereCommandRPlus, CohereCommandRPlusV2 Qwen: Qwen3_235B, Qwen3Coder480B, Qwen3_32B, Qwen3Coder30B, Qwen3Next80B, Qwen3VL235B Google: Gemma3_27B, Gemma3_12B, Gemma3_4B DeepSeek: DeepSeekR1, DeepSeekV3_1, DeepSeekV3_2 Moonshot: KimiK2Thinking, KimiK2_5 + Z.AI GLM: GLM4_7, GLM4_7Flash, GLM5 + MiniMax: MiniMaxM2_1, MiniMaxM2, MiniMaxM2_5 + NVIDIA: NemotronNano2, NemotronNano2VL, Nemotron3Nano30BA3B, + Nemotron3Super120BA12B + OpenAI: GptOss20B, GptOss120B, GptOssSafeguard20B, GptOssSafeguard120B Llama 4: Llama4Scout17B, Llama4Maverick17B Llama 3.3: Llama3_3_70B Llama 3.2: Llama3_2_90B, Llama3_2_11B, Llama3_2_3B, Llama3_2_1B Llama 3.1: Llama3_1_405B, Llama3_1_70B, Llama3_1_8B Llama 3: Llama3_70B, Llama3_8B - Writer: WriterPalmyraX4, WriterPalmyraX5 + Writer: WriterPalmyraX4, WriterPalmyraX5, WriterPalmyraVision7B AI21: AI21Jamba1_5Large, AI21Jamba1_5Mini, AI21JambaInstruct EXAMPLES: diff --git a/mixtape-core/src/lib.rs b/mixtape-core/src/lib.rs index 8c4470c..9cd268a 100644 --- a/mixtape-core/src/lib.rs +++ b/mixtape-core/src/lib.rs @@ -199,7 +199,7 @@ pub use models::{CohereCommandR, CohereCommandRPlus, CohereCommandRPlusV2}; // DeepSeek pub use models::{DeepSeekR1, DeepSeekV3_1, DeepSeekV3_2}; // Z.AI GLM -pub use models::{GLM4_7Flash, GLM4_7}; +pub use models::{GLM4_7Flash, GLM4_7, GLM5}; // Google pub use models::{Gemma3_12B, Gemma3_27B, Gemma3_4B}; // Meta Llama @@ -208,20 +208,24 @@ pub use models::{ Llama3_3_70B, Llama3_70B, Llama3_8B, Llama4Maverick17B, Llama4Scout17B, }; // MiniMax -pub use models::MiniMaxM2_1; +pub use models::{MiniMaxM2, MiniMaxM2_1, MiniMaxM2_5}; // Mistral pub use models::{ - MagistralSmall, Ministral14B, Ministral3B, Ministral8B, MistralLarge2, MistralLarge3, - MistralSmall, PixtralLarge, VoxtralMini3B, VoxtralSmall24B, + Devstral2_135B, MagistralSmall, Ministral14B, Ministral3B, Ministral8B, MistralLarge2, + MistralLarge3, MistralSmall, PixtralLarge, VoxtralMini3B, VoxtralSmall24B, }; // Moonshot Kimi pub use models::{KimiK2Thinking, KimiK2_5}; +// NVIDIA +pub use models::{Nemotron3Nano30BA3B, Nemotron3Super120BA12B, NemotronNano2, NemotronNano2VL}; +// OpenAI +pub use models::{GptOss120B, GptOss20B, GptOssSafeguard120B, GptOssSafeguard20B}; // Alibaba Qwen pub use models::{ Qwen3Coder30B, Qwen3Coder480B, Qwen3CoderNext, Qwen3Next80B, Qwen3VL235B, Qwen3_235B, Qwen3_32B, }; // Writer AI Palmyra -pub use models::{WriterPalmyraX4, WriterPalmyraX5}; +pub use models::{WriterPalmyraVision7B, WriterPalmyraX4, WriterPalmyraX5}; pub use tokenizer::CharacterTokenizer; pub use tool::{box_tool, DocumentFormat, DynTool, ImageFormat, Tool, ToolError, ToolResult}; diff --git a/mixtape-core/src/models/glm.rs b/mixtape-core/src/models/glm.rs index 153723d..5413506 100644 --- a/mixtape-core/src/models/glm.rs +++ b/mixtape-core/src/models/glm.rs @@ -21,3 +21,13 @@ define_model!( output_tokens: 131_072 } ); + +define_model!( + /// GLM 5 - Next-gen frontier model from Z.AI + GLM5 { + display_name: "GLM 5", + bedrock_id: "zai.glm-5", + context_tokens: 202_752, + output_tokens: 131_072 + } +); diff --git a/mixtape-core/src/models/minimax.rs b/mixtape-core/src/models/minimax.rs index 7227f36..3f0d149 100644 --- a/mixtape-core/src/models/minimax.rs +++ b/mixtape-core/src/models/minimax.rs @@ -11,3 +11,23 @@ define_model!( output_tokens: 131_072 } ); + +define_model!( + /// MiniMax M2 - MoE model from MiniMax + MiniMaxM2 { + display_name: "MiniMax M2", + bedrock_id: "minimax.minimax-m2", + context_tokens: 204_800, + output_tokens: 131_072 + } +); + +define_model!( + /// MiniMax M2.5 - Updated MoE model from MiniMax + MiniMaxM2_5 { + display_name: "MiniMax M2.5", + bedrock_id: "minimax.minimax-m2.5", + context_tokens: 204_800, + output_tokens: 131_072 + } +); diff --git a/mixtape-core/src/models/mistral.rs b/mixtape-core/src/models/mistral.rs index 9810679..cf9c897 100644 --- a/mixtape-core/src/models/mistral.rs +++ b/mixtape-core/src/models/mistral.rs @@ -101,3 +101,13 @@ define_model!( output_tokens: 8_192 } ); + +define_model!( + /// Devstral 2 135B - Code-focused instruction model + Devstral2_135B { + display_name: "Devstral 2 135B", + bedrock_id: "mistral.devstral-2-135b-instruct", + context_tokens: 256_000, + output_tokens: 8_192 + } +); diff --git a/mixtape-core/src/models/mod.rs b/mixtape-core/src/models/mod.rs index 1260e68..8ea541e 100644 --- a/mixtape-core/src/models/mod.rs +++ b/mixtape-core/src/models/mod.rs @@ -16,6 +16,8 @@ //! - `minimax` - MiniMax models //! - `mistral` - Mistral AI models //! - `nova` - Amazon Nova models +//! - `nvidia` - NVIDIA Nemotron models +//! - `openai` - OpenAI GPT-OSS models //! - `qwen` - Alibaba Qwen models //! - `titan` - Amazon Titan Text models //! - `writer` - Writer AI Palmyra models @@ -31,6 +33,8 @@ mod llama; mod minimax; mod mistral; mod nova; +mod nvidia; +mod openai; mod qwen; mod titan; mod writer; @@ -47,6 +51,8 @@ pub use llama::*; pub use minimax::*; pub use mistral::*; pub use nova::*; +pub use nvidia::*; +pub use openai::*; pub use qwen::*; pub use titan::*; pub use writer::*; @@ -210,6 +216,7 @@ mod tests { &PixtralLarge, &VoxtralMini3B, &VoxtralSmall24B, + &Devstral2_135B, // Cohere &CohereCommandR, &CohereCommandRPlus, @@ -222,9 +229,20 @@ mod tests { &Qwen3Next80B, &Qwen3VL235B, &Qwen3CoderNext, + // NVIDIA + &NemotronNano2, + &NemotronNano2VL, + &Nemotron3Nano30BA3B, + &Nemotron3Super120BA12B, + // OpenAI + &GptOss20B, + &GptOss120B, + &GptOssSafeguard20B, + &GptOssSafeguard120B, // Z.AI GLM &GLM4_7, &GLM4_7Flash, + &GLM5, // Google &Gemma3_27B, &Gemma3_12B, @@ -238,6 +256,8 @@ mod tests { &KimiK2_5, // MiniMax &MiniMaxM2_1, + &MiniMaxM2, + &MiniMaxM2_5, // Meta Llama &Llama4Scout17B, &Llama4Maverick17B, @@ -254,6 +274,7 @@ mod tests { // Writer &WriterPalmyraX4, &WriterPalmyraX5, + &WriterPalmyraVision7B, // AI21 &AI21Jamba1_5Large, &AI21Jamba1_5Mini, diff --git a/mixtape-core/src/models/nvidia.rs b/mixtape-core/src/models/nvidia.rs new file mode 100644 index 0000000..0f8e2f3 --- /dev/null +++ b/mixtape-core/src/models/nvidia.rs @@ -0,0 +1,43 @@ +//! NVIDIA Nemotron models + +use super::define_model; + +define_model!( + /// Nemotron Nano 2 - Compact model from NVIDIA + NemotronNano2 { + display_name: "Nemotron Nano 2", + bedrock_id: "nvidia.nemotron-nano-2", + context_tokens: 128_000, + output_tokens: 8_192 + } +); + +define_model!( + /// Nemotron Nano 2 VL - Vision-language variant of Nemotron Nano 2 + NemotronNano2VL { + display_name: "Nemotron Nano 2 VL", + bedrock_id: "nvidia.nemotron-nano-2-vl", + context_tokens: 128_000, + output_tokens: 8_192 + } +); + +define_model!( + /// Nemotron 3 Nano 30B A3B - 30B MoE model with 3B active parameters + Nemotron3Nano30BA3B { + display_name: "Nemotron 3 Nano 30B A3B", + bedrock_id: "nvidia.nemotron-3-nano-30b-a3b", + context_tokens: 128_000, + output_tokens: 8_192 + } +); + +define_model!( + /// Nemotron 3 Super 120B A12B - 120B MoE model with 12B active parameters + Nemotron3Super120BA12B { + display_name: "Nemotron 3 Super 120B A12B", + bedrock_id: "nvidia.nemotron-3-super-120b-a12b", + context_tokens: 128_000, + output_tokens: 8_192 + } +); diff --git a/mixtape-core/src/models/openai.rs b/mixtape-core/src/models/openai.rs new file mode 100644 index 0000000..01eb9c5 --- /dev/null +++ b/mixtape-core/src/models/openai.rs @@ -0,0 +1,43 @@ +//! OpenAI GPT-OSS models + +use super::define_model; + +define_model!( + /// GPT OSS 20B - Open-source 20B model from OpenAI + GptOss20B { + display_name: "GPT OSS 20B", + bedrock_id: "openai.gpt-oss-20b", + context_tokens: 128_000, + output_tokens: 8_192 + } +); + +define_model!( + /// GPT OSS 120B - Open-source 120B model from OpenAI + GptOss120B { + display_name: "GPT OSS 120B", + bedrock_id: "openai.gpt-oss-120b", + context_tokens: 128_000, + output_tokens: 8_192 + } +); + +define_model!( + /// GPT OSS Safeguard 20B - Safety-focused 20B model from OpenAI + GptOssSafeguard20B { + display_name: "GPT OSS Safeguard 20B", + bedrock_id: "openai.gpt-oss-safeguard-20b", + context_tokens: 128_000, + output_tokens: 8_192 + } +); + +define_model!( + /// GPT OSS Safeguard 120B - Safety-focused 120B model from OpenAI + GptOssSafeguard120B { + display_name: "GPT OSS Safeguard 120B", + bedrock_id: "openai.gpt-oss-safeguard-120b", + context_tokens: 128_000, + output_tokens: 8_192 + } +); diff --git a/mixtape-core/src/models/writer.rs b/mixtape-core/src/models/writer.rs index 66855e7..d93ccb6 100644 --- a/mixtape-core/src/models/writer.rs +++ b/mixtape-core/src/models/writer.rs @@ -21,3 +21,13 @@ define_model!( output_tokens: 8_192 } ); + +define_model!( + /// Palmyra Vision 7B - Vision-language model from Writer + WriterPalmyraVision7B { + display_name: "Palmyra Vision 7B", + bedrock_id: "writer.palmyra-vision-7b-v1:0", + context_tokens: 128_000, + output_tokens: 8_192 + } +);