Add unified models UI and Rig Bedrock runtime

This commit is contained in:
2026-08-04 17:25:19 -05:00
parent a3c68e9c30
commit b0ad07f6f2
41 changed files with 2122 additions and 564 deletions
+7
View File
@@ -4346,6 +4346,7 @@ impl BlocklistAIController {
secret_access_key: settings.bedrock_secret_access_key.value().clone(),
session_token: None,
cross_region_inference: *settings.bedrock_cross_region_inference.value(),
use_rig: false,
};
if let ::ai::api_keys::AwsCredentialsState::Loaded { credentials, .. } =
@@ -4431,6 +4432,9 @@ impl BlocklistAIController {
.iter()
.map(|p| match p {
ContentPart::Text(t) => t.clone(),
ContentPart::Reasoning { text, .. } => {
format!("[Reasoning] {text}")
}
ContentPart::Image { .. } => "[Image attachment]".to_string(),
ContentPart::ToolUse { name, input, .. } => {
format!("[Tool: {}] {}", name, input)
@@ -4540,6 +4544,9 @@ impl BlocklistAIController {
.iter()
.map(|p| match p {
ContentPart::Text(t) => (t.len() / 4) as u32,
ContentPart::Reasoning { text, .. } => {
(text.len() / 4) as u32
}
ContentPart::Image { .. } => 1_600,
ContentPart::ToolUse { input, .. } => {
(input.to_string().len() / 4) as u32