Rebrand to Galaxy, major improvements to Bedrock support, still needs some TLC though

This commit is contained in:
Ryan Ward
2026-05-07 11:29:34 -05:00
parent f4e2475c60
commit a41cbd8cc7
2433 changed files with 14208 additions and 9409 deletions
+88 -88
View File
@@ -11,8 +11,8 @@ use std::{
collections::{HashMap, HashSet},
time::Duration,
};
use warp_core::channel::ChannelState;
use warp_core::{features::FeatureFlag, report_error};
use galaxy_core::channel::ChannelState;
use galaxy_core::{features::FeatureFlag, report_error};
use warp_multi_agent_api::ConversationData;
use super::auth::AuthClient;
@@ -61,12 +61,12 @@ use ai::index::full_source_code_embedding::{
store_client::{IntermediateNode, StoreClient},
CodebaseContextConfig, ContentHash, EmbeddingConfig, NodeHash, RepoMetadata,
};
use warp_graphql::client::Operation;
use galaxy_graphql::client::Operation;
#[cfg(not(feature = "agent_mode_evals"))]
use warp_graphql::queries::get_request_limit_info::{
use galaxy_graphql::queries::get_request_limit_info::{
GetRequestLimitInfo, GetRequestLimitInfoVariables,
};
use warp_graphql::{
use galaxy_graphql::{
ai::{AgentTaskState, PlatformErrorCode},
mutations::{
confirm_file_artifact_upload::{
@@ -961,7 +961,7 @@ pub trait AIClient: 'static + Send + Sync {
}
fn into_file_artifact_record(
artifact: warp_graphql::mutations::create_file_artifact_upload_target::FileArtifact,
artifact: galaxy_graphql::mutations::create_file_artifact_upload_target::FileArtifact,
) -> FileArtifactRecord {
FileArtifactRecord {
artifact_uid: artifact.artifact_uid.into_inner(),
@@ -1122,7 +1122,7 @@ impl AIClient for ServerApi {
let response = self.send_graphql_request(operation, None).await?;
match response.user {
warp_graphql::queries::get_request_limit_info::UserResult::UserOutput(user_output) => {
galaxy_graphql::queries::get_request_limit_info::UserResult::UserOutput(user_output) => {
let request_limit_info = user_output.user.request_limit_info.into();
let workspace_bonus_grants = user_output
@@ -1158,10 +1158,10 @@ impl AIClient for ServerApi {
bonus_grants,
})
}
warp_graphql::queries::get_request_limit_info::UserResult::UserFacingError(e) => {
galaxy_graphql::queries::get_request_limit_info::UserResult::UserFacingError(e) => {
Err(anyhow!(get_user_facing_error_message(e)))
}
warp_graphql::queries::get_request_limit_info::UserResult::Unknown => {
galaxy_graphql::queries::get_request_limit_info::UserResult::Unknown => {
Err(anyhow!("failed to get request limit info"))
}
}
@@ -1175,9 +1175,9 @@ impl AIClient for ServerApi {
let response = self.send_graphql_request(operation, None).await?;
match response.user {
warp_graphql::queries::get_feature_model_choices::UserResult::UserOutput(
warp_graphql::queries::get_feature_model_choices::UserOutput {
user: warp_graphql::queries::get_feature_model_choices::User { mut workspaces },
galaxy_graphql::queries::get_feature_model_choices::UserResult::UserOutput(
galaxy_graphql::queries::get_feature_model_choices::UserOutput {
user: galaxy_graphql::queries::get_feature_model_choices::User { mut workspaces },
},
) if !workspaces.is_empty() => {
// This is safe (`remove()` can panic) because we ensure workspaces is non-empty
@@ -1211,7 +1211,7 @@ impl AIClient for ServerApi {
let response = operation
.send_request(
self.client.clone(),
warp_graphql::client::RequestOptions {
galaxy_graphql::client::RequestOptions {
auth_token,
..default_request_options()
},
@@ -1483,7 +1483,7 @@ impl AIClient for ServerApi {
&self,
server_conversation_token: ServerConversationToken,
) -> anyhow::Result<(ConversationData, ServerAIConversationMetadata), anyhow::Error> {
use warp_graphql::queries::list_ai_conversations::{
use galaxy_graphql::queries::list_ai_conversations::{
ListAIConversations, ListAIConversationsInput, ListAIConversationsResult,
ListAIConversationsVariables,
};
@@ -1531,7 +1531,7 @@ impl AIClient for ServerApi {
if !FeatureFlag::CloudConversations.is_enabled() {
return Ok(vec![]);
}
use warp_graphql::queries::list_ai_conversations::{
use galaxy_graphql::queries::list_ai_conversations::{
ListAIConversationMetadata, ListAIConversationMetadataResult,
ListAIConversationMetadataVariables, ListAIConversationsInput,
};
@@ -1571,11 +1571,11 @@ impl AIClient for ServerApi {
&self,
server_conversation_token: ServerConversationToken,
) -> anyhow::Result<AIAgentConversationFormat, anyhow::Error> {
use warp_graphql::queries::get_ai_conversation_format::{
use galaxy_graphql::queries::get_ai_conversation_format::{
GetAIConversationFormat, GetAIConversationFormatResult,
GetAIConversationFormatVariables,
};
use warp_graphql::queries::list_ai_conversations::ListAIConversationsInput;
use galaxy_graphql::queries::list_ai_conversations::ListAIConversationsInput;
let conversation_id = server_conversation_token.as_str().to_string();
let operation = GetAIConversationFormat::build(GetAIConversationFormatVariables {
@@ -1958,13 +1958,13 @@ impl AIClient for ServerApi {
}
}
impl TryFrom<warp_graphql::queries::get_feature_model_choices::FeatureModelChoice>
impl TryFrom<galaxy_graphql::queries::get_feature_model_choices::FeatureModelChoice>
for ModelsByFeature
{
type Error = anyhow::Error;
fn try_from(
value: warp_graphql::queries::get_feature_model_choices::FeatureModelChoice,
value: galaxy_graphql::queries::get_feature_model_choices::FeatureModelChoice,
) -> Result<Self, Self::Error> {
Ok(Self {
agent_mode: value.agent_mode.try_into()?,
@@ -1975,10 +1975,10 @@ impl TryFrom<warp_graphql::queries::get_feature_model_choices::FeatureModelChoic
}
}
impl TryFrom<warp_graphql::workspace::FeatureModelChoice> for ModelsByFeature {
impl TryFrom<galaxy_graphql::workspace::FeatureModelChoice> for ModelsByFeature {
type Error = anyhow::Error;
fn try_from(value: warp_graphql::workspace::FeatureModelChoice) -> Result<Self, Self::Error> {
fn try_from(value: galaxy_graphql::workspace::FeatureModelChoice) -> Result<Self, Self::Error> {
Ok(Self {
agent_mode: value.agent_mode.try_into()?,
coding: value.coding.try_into()?,
@@ -1988,11 +1988,11 @@ impl TryFrom<warp_graphql::workspace::FeatureModelChoice> for ModelsByFeature {
}
}
impl TryFrom<warp_graphql::queries::get_feature_model_choices::AvailableLlms> for AvailableLLMs {
impl TryFrom<galaxy_graphql::queries::get_feature_model_choices::AvailableLlms> for AvailableLLMs {
type Error = anyhow::Error;
fn try_from(
value: warp_graphql::queries::get_feature_model_choices::AvailableLlms,
value: galaxy_graphql::queries::get_feature_model_choices::AvailableLlms,
) -> Result<Self, Self::Error> {
Self::new(
value.default_id.into(),
@@ -2002,10 +2002,10 @@ impl TryFrom<warp_graphql::queries::get_feature_model_choices::AvailableLlms> fo
}
}
impl TryFrom<warp_graphql::workspace::AvailableLlms> for AvailableLLMs {
impl TryFrom<galaxy_graphql::workspace::AvailableLlms> for AvailableLLMs {
type Error = anyhow::Error;
fn try_from(value: warp_graphql::workspace::AvailableLlms) -> Result<Self, Self::Error> {
fn try_from(value: galaxy_graphql::workspace::AvailableLlms) -> Result<Self, Self::Error> {
Self::new(
value.default_id.into(),
value.choices.into_iter().map(LLMInfo::from),
@@ -2014,8 +2014,8 @@ impl TryFrom<warp_graphql::workspace::AvailableLlms> for AvailableLLMs {
}
}
impl From<warp_graphql::queries::get_feature_model_choices::LlmInfo> for LLMInfo {
fn from(value: warp_graphql::queries::get_feature_model_choices::LlmInfo) -> Self {
impl From<galaxy_graphql::queries::get_feature_model_choices::LlmInfo> for LLMInfo {
fn from(value: galaxy_graphql::queries::get_feature_model_choices::LlmInfo) -> Self {
let host_configs = {
let mut map = std::collections::HashMap::new();
for config in value.host_configs {
@@ -2047,8 +2047,8 @@ impl From<warp_graphql::queries::get_feature_model_choices::LlmInfo> for LLMInfo
}
}
impl From<warp_graphql::workspace::LlmInfo> for LLMInfo {
fn from(value: warp_graphql::workspace::LlmInfo) -> Self {
impl From<galaxy_graphql::workspace::LlmInfo> for LLMInfo {
fn from(value: galaxy_graphql::workspace::LlmInfo) -> Self {
let host_configs = {
let mut map = std::collections::HashMap::new();
for config in value.host_configs {
@@ -2080,10 +2080,10 @@ impl From<warp_graphql::workspace::LlmInfo> for LLMInfo {
}
}
impl From<warp_graphql::queries::get_feature_model_choices::RoutingHostConfig>
impl From<galaxy_graphql::queries::get_feature_model_choices::RoutingHostConfig>
for RoutingHostConfig
{
fn from(value: warp_graphql::queries::get_feature_model_choices::RoutingHostConfig) -> Self {
fn from(value: galaxy_graphql::queries::get_feature_model_choices::RoutingHostConfig) -> Self {
Self {
enabled: value.enabled,
model_routing_host: value.model_routing_host.into(),
@@ -2091,8 +2091,8 @@ impl From<warp_graphql::queries::get_feature_model_choices::RoutingHostConfig>
}
}
impl From<warp_graphql::workspace::RoutingHostConfig> for RoutingHostConfig {
fn from(value: warp_graphql::workspace::RoutingHostConfig) -> Self {
impl From<galaxy_graphql::workspace::RoutingHostConfig> for RoutingHostConfig {
fn from(value: galaxy_graphql::workspace::RoutingHostConfig) -> Self {
Self {
enabled: value.enabled,
model_routing_host: value.model_routing_host.into(),
@@ -2100,16 +2100,16 @@ impl From<warp_graphql::workspace::RoutingHostConfig> for RoutingHostConfig {
}
}
impl From<warp_graphql::queries::get_feature_model_choices::LlmModelHost> for LLMModelHost {
fn from(value: warp_graphql::queries::get_feature_model_choices::LlmModelHost) -> Self {
impl From<galaxy_graphql::queries::get_feature_model_choices::LlmModelHost> for LLMModelHost {
fn from(value: galaxy_graphql::queries::get_feature_model_choices::LlmModelHost) -> Self {
match value {
warp_graphql::queries::get_feature_model_choices::LlmModelHost::DirectApi => {
galaxy_graphql::queries::get_feature_model_choices::LlmModelHost::DirectApi => {
LLMModelHost::DirectApi
}
warp_graphql::queries::get_feature_model_choices::LlmModelHost::AwsBedrock => {
galaxy_graphql::queries::get_feature_model_choices::LlmModelHost::AwsBedrock => {
LLMModelHost::AwsBedrock
}
warp_graphql::queries::get_feature_model_choices::LlmModelHost::Other(value) => {
galaxy_graphql::queries::get_feature_model_choices::LlmModelHost::Other(value) => {
report_error!(anyhow!(
"Unknown LlmModelHost '{value}'. Make sure to update client GraphQL types!"
));
@@ -2119,23 +2119,23 @@ impl From<warp_graphql::queries::get_feature_model_choices::LlmModelHost> for LL
}
}
impl From<warp_graphql::queries::get_feature_model_choices::LlmProvider> for LLMProvider {
fn from(value: warp_graphql::queries::get_feature_model_choices::LlmProvider) -> Self {
impl From<galaxy_graphql::queries::get_feature_model_choices::LlmProvider> for LLMProvider {
fn from(value: galaxy_graphql::queries::get_feature_model_choices::LlmProvider) -> Self {
match value {
warp_graphql::queries::get_feature_model_choices::LlmProvider::Openai => {
galaxy_graphql::queries::get_feature_model_choices::LlmProvider::Openai => {
LLMProvider::OpenAI
}
warp_graphql::queries::get_feature_model_choices::LlmProvider::Anthropic => {
galaxy_graphql::queries::get_feature_model_choices::LlmProvider::Anthropic => {
LLMProvider::Anthropic
}
warp_graphql::queries::get_feature_model_choices::LlmProvider::Google => {
galaxy_graphql::queries::get_feature_model_choices::LlmProvider::Google => {
LLMProvider::Google
}
warp_graphql::queries::get_feature_model_choices::LlmProvider::Xai => LLMProvider::Xai,
warp_graphql::queries::get_feature_model_choices::LlmProvider::Unknown => {
galaxy_graphql::queries::get_feature_model_choices::LlmProvider::Xai => LLMProvider::Xai,
galaxy_graphql::queries::get_feature_model_choices::LlmProvider::Unknown => {
LLMProvider::Unknown
}
warp_graphql::queries::get_feature_model_choices::LlmProvider::Other(value) => {
galaxy_graphql::queries::get_feature_model_choices::LlmProvider::Other(value) => {
report_error!(anyhow!(
"Invalid LlmProvider '{value}'. Make sure to update client GraphQL types!"
));
@@ -2145,15 +2145,15 @@ impl From<warp_graphql::queries::get_feature_model_choices::LlmProvider> for LLM
}
}
impl From<warp_graphql::workspace::LlmProvider> for LLMProvider {
fn from(value: warp_graphql::workspace::LlmProvider) -> Self {
impl From<galaxy_graphql::workspace::LlmProvider> for LLMProvider {
fn from(value: galaxy_graphql::workspace::LlmProvider) -> Self {
match value {
warp_graphql::workspace::LlmProvider::Openai => LLMProvider::OpenAI,
warp_graphql::workspace::LlmProvider::Anthropic => LLMProvider::Anthropic,
warp_graphql::workspace::LlmProvider::Google => LLMProvider::Google,
warp_graphql::workspace::LlmProvider::Xai => LLMProvider::Xai,
warp_graphql::workspace::LlmProvider::Unknown => LLMProvider::Unknown,
warp_graphql::workspace::LlmProvider::Other(value) => {
galaxy_graphql::workspace::LlmProvider::Openai => LLMProvider::OpenAI,
galaxy_graphql::workspace::LlmProvider::Anthropic => LLMProvider::Anthropic,
galaxy_graphql::workspace::LlmProvider::Google => LLMProvider::Google,
galaxy_graphql::workspace::LlmProvider::Xai => LLMProvider::Xai,
galaxy_graphql::workspace::LlmProvider::Unknown => LLMProvider::Unknown,
galaxy_graphql::workspace::LlmProvider::Other(value) => {
report_error!(anyhow!(
"Invalid LlmProvider '{value}'. Make sure to update client GraphQL types!"
));
@@ -2163,8 +2163,8 @@ impl From<warp_graphql::workspace::LlmProvider> for LLMProvider {
}
}
impl From<warp_graphql::queries::get_feature_model_choices::LlmSpec> for LLMSpec {
fn from(value: warp_graphql::queries::get_feature_model_choices::LlmSpec) -> Self {
impl From<galaxy_graphql::queries::get_feature_model_choices::LlmSpec> for LLMSpec {
fn from(value: galaxy_graphql::queries::get_feature_model_choices::LlmSpec) -> Self {
Self {
cost: value.cost as f32,
quality: value.quality as f32,
@@ -2173,8 +2173,8 @@ impl From<warp_graphql::queries::get_feature_model_choices::LlmSpec> for LLMSpec
}
}
impl From<warp_graphql::workspace::LlmSpec> for LLMSpec {
fn from(value: warp_graphql::workspace::LlmSpec) -> Self {
impl From<galaxy_graphql::workspace::LlmSpec> for LLMSpec {
fn from(value: galaxy_graphql::workspace::LlmSpec) -> Self {
Self {
cost: value.cost as f32,
quality: value.quality as f32,
@@ -2183,8 +2183,8 @@ impl From<warp_graphql::workspace::LlmSpec> for LLMSpec {
}
}
impl From<warp_graphql::queries::get_feature_model_choices::LlmUsageMetadata> for LLMUsageMetadata {
fn from(value: warp_graphql::queries::get_feature_model_choices::LlmUsageMetadata) -> Self {
impl From<galaxy_graphql::queries::get_feature_model_choices::LlmUsageMetadata> for LLMUsageMetadata {
fn from(value: galaxy_graphql::queries::get_feature_model_choices::LlmUsageMetadata) -> Self {
Self {
request_multiplier: value.request_multiplier.max(1) as usize,
credit_multiplier: value.credit_multiplier.map(|v| v as f32),
@@ -2192,8 +2192,8 @@ impl From<warp_graphql::queries::get_feature_model_choices::LlmUsageMetadata> fo
}
}
impl From<warp_graphql::workspace::LlmUsageMetadata> for LLMUsageMetadata {
fn from(value: warp_graphql::workspace::LlmUsageMetadata) -> Self {
impl From<galaxy_graphql::workspace::LlmUsageMetadata> for LLMUsageMetadata {
fn from(value: galaxy_graphql::workspace::LlmUsageMetadata) -> Self {
Self {
request_multiplier: value.request_multiplier.max(1) as usize,
credit_multiplier: value.credit_multiplier.map(|v| v as f32),
@@ -2201,50 +2201,50 @@ impl From<warp_graphql::workspace::LlmUsageMetadata> for LLMUsageMetadata {
}
}
impl From<warp_graphql::queries::get_feature_model_choices::DisableReason> for DisableReason {
fn from(value: warp_graphql::queries::get_feature_model_choices::DisableReason) -> Self {
impl From<galaxy_graphql::queries::get_feature_model_choices::DisableReason> for DisableReason {
fn from(value: galaxy_graphql::queries::get_feature_model_choices::DisableReason) -> Self {
match value {
warp_graphql::queries::get_feature_model_choices::DisableReason::AdminDisabled => {
galaxy_graphql::queries::get_feature_model_choices::DisableReason::AdminDisabled => {
DisableReason::AdminDisabled
}
warp_graphql::queries::get_feature_model_choices::DisableReason::OutOfRequests => {
galaxy_graphql::queries::get_feature_model_choices::DisableReason::OutOfRequests => {
DisableReason::OutOfRequests
}
warp_graphql::queries::get_feature_model_choices::DisableReason::ProviderOutage => {
galaxy_graphql::queries::get_feature_model_choices::DisableReason::ProviderOutage => {
DisableReason::ProviderOutage
}
warp_graphql::queries::get_feature_model_choices::DisableReason::RequiresUpgrade => {
galaxy_graphql::queries::get_feature_model_choices::DisableReason::RequiresUpgrade => {
DisableReason::RequiresUpgrade
}
warp_graphql::queries::get_feature_model_choices::DisableReason::Other(_) => {
galaxy_graphql::queries::get_feature_model_choices::DisableReason::Other(_) => {
DisableReason::Unavailable
}
}
}
}
impl From<warp_graphql::workspace::DisableReason> for DisableReason {
fn from(value: warp_graphql::workspace::DisableReason) -> Self {
impl From<galaxy_graphql::workspace::DisableReason> for DisableReason {
fn from(value: galaxy_graphql::workspace::DisableReason) -> Self {
match value {
warp_graphql::workspace::DisableReason::AdminDisabled => DisableReason::AdminDisabled,
warp_graphql::workspace::DisableReason::OutOfRequests => DisableReason::OutOfRequests,
warp_graphql::workspace::DisableReason::ProviderOutage => DisableReason::ProviderOutage,
warp_graphql::workspace::DisableReason::RequiresUpgrade => {
galaxy_graphql::workspace::DisableReason::AdminDisabled => DisableReason::AdminDisabled,
galaxy_graphql::workspace::DisableReason::OutOfRequests => DisableReason::OutOfRequests,
galaxy_graphql::workspace::DisableReason::ProviderOutage => DisableReason::ProviderOutage,
galaxy_graphql::workspace::DisableReason::RequiresUpgrade => {
DisableReason::RequiresUpgrade
}
warp_graphql::workspace::DisableReason::Other(_) => DisableReason::Unavailable,
galaxy_graphql::workspace::DisableReason::Other(_) => DisableReason::Unavailable,
}
}
}
// Conversions for AIConversationMetadata from GraphQL types
fn convert_harness(harness: warp_graphql::ai::AgentHarness) -> AIAgentHarness {
fn convert_harness(harness: galaxy_graphql::ai::AgentHarness) -> AIAgentHarness {
match harness {
warp_graphql::ai::AgentHarness::Oz => AIAgentHarness::Oz,
warp_graphql::ai::AgentHarness::ClaudeCode => AIAgentHarness::ClaudeCode,
warp_graphql::ai::AgentHarness::Gemini => AIAgentHarness::Gemini,
warp_graphql::ai::AgentHarness::Other(value) => {
galaxy_graphql::ai::AgentHarness::Oz => AIAgentHarness::Oz,
galaxy_graphql::ai::AgentHarness::ClaudeCode => AIAgentHarness::ClaudeCode,
galaxy_graphql::ai::AgentHarness::Gemini => AIAgentHarness::Gemini,
galaxy_graphql::ai::AgentHarness::Other(value) => {
report_error!(anyhow!(
"Invalid AgentHarness '{value}'. Make sure to update client GraphQL types!"
));
@@ -2254,15 +2254,15 @@ fn convert_harness(harness: warp_graphql::ai::AgentHarness) -> AIAgentHarness {
}
fn convert_block_snapshot_format(
format: warp_graphql::ai::SerializedBlockFormat,
format: galaxy_graphql::ai::SerializedBlockFormat,
) -> AIAgentSerializedBlockFormat {
match format {
warp_graphql::ai::SerializedBlockFormat::JsonV1 => AIAgentSerializedBlockFormat::JsonV1,
galaxy_graphql::ai::SerializedBlockFormat::JsonV1 => AIAgentSerializedBlockFormat::JsonV1,
}
}
fn convert_conversation_format(
format: warp_graphql::ai::AIConversationFormat,
format: galaxy_graphql::ai::AIConversationFormat,
) -> AIAgentConversationFormat {
AIAgentConversationFormat {
has_task_list: format.has_task_list,
@@ -2286,10 +2286,10 @@ fn convert_usage_metadata(
}
}
impl TryFrom<warp_graphql::ai::AIConversation> for ServerAIConversationMetadata {
impl TryFrom<galaxy_graphql::ai::AIConversation> for ServerAIConversationMetadata {
type Error = anyhow::Error;
fn try_from(value: warp_graphql::ai::AIConversation) -> Result<Self, Self::Error> {
fn try_from(value: galaxy_graphql::ai::AIConversation) -> Result<Self, Self::Error> {
let usage = convert_usage_metadata(
value.usage.usage_metadata.summarized,
value.usage.usage_metadata.context_window_usage,
@@ -2326,13 +2326,13 @@ impl TryFrom<warp_graphql::ai::AIConversation> for ServerAIConversationMetadata
}
}
impl TryFrom<warp_graphql::queries::list_ai_conversations::AIConversationMetadata>
impl TryFrom<galaxy_graphql::queries::list_ai_conversations::AIConversationMetadata>
for ServerAIConversationMetadata
{
type Error = anyhow::Error;
fn try_from(
value: warp_graphql::queries::list_ai_conversations::AIConversationMetadata,
value: galaxy_graphql::queries::list_ai_conversations::AIConversationMetadata,
) -> Result<Self, Self::Error> {
let usage = convert_usage_metadata(
value.usage.usage_metadata.summarized,