mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-09-11 22:53:00 +00:00
Import lithos-llm types directly instead of through fabro-types
fabro-types no longer re-exports the lithos catalog and request types (ProviderId, ModelId, ModelHandle, Message, ContentPart, TokenCounts, Cost, Speed, ReasoningEffort, ReasoningOutput, and the rest). Every crate that uses them depends on lithos-llm and names them there, and the fabro-api progenitor replacements point at the lithos paths. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
parent
fa3e485c95
commit
619cb44e3c
116 changed files with 401 additions and 333 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
|
@ -2517,6 +2517,7 @@ dependencies = [
|
|||
"futures",
|
||||
"httpmock",
|
||||
"libc",
|
||||
"lithos-llm",
|
||||
"progenitor-client",
|
||||
"rand 0.9.4",
|
||||
"serde",
|
||||
|
|
@ -3120,6 +3121,7 @@ dependencies = [
|
|||
"futures",
|
||||
"hex",
|
||||
"insta",
|
||||
"lithos-llm",
|
||||
"object_store",
|
||||
"percent-encoding",
|
||||
"serde",
|
||||
|
|
|
|||
|
|
@ -387,7 +387,7 @@ Credential sources live in `fabro-auth`: `VaultCredentialSource` reads a Fabro v
|
|||
|
||||
```rust
|
||||
use fabro_llm::Request;
|
||||
use fabro_types::{Message, Role};
|
||||
use lithos_llm::types::{Message, Role};
|
||||
|
||||
let request = Request::builder()
|
||||
.model("openai/gpt-5.4")
|
||||
|
|
@ -506,7 +506,7 @@ use std::sync::Arc;
|
|||
|
||||
use fabro_llm::ClientOptions;
|
||||
use fabro_llm::gateway::GatewayAdapter;
|
||||
use fabro_types::ProviderId;
|
||||
use lithos_llm::catalog::ProviderId;
|
||||
|
||||
let adapter = Arc::new(GatewayAdapter::new(Box::new(my_transport)));
|
||||
let built = fabro_llm::build_offline_client(
|
||||
|
|
|
|||
|
|
@ -7,10 +7,11 @@ use fabro_agent::cli::AgentArgs;
|
|||
use fabro_config::{CliLayer, CliLoggingLayer, CliOutputLayer, CliUpdatesLayer};
|
||||
use fabro_server::serve::DEFAULT_TCP_PORT;
|
||||
use fabro_static::EnvVars;
|
||||
use fabro_types::ReasoningEffort;
|
||||
use fabro_types::settings::cli::{OutputFormat, OutputVerbosity};
|
||||
use fabro_types::settings::run::MergeStrategy;
|
||||
use fabro_util::printer::Printer;
|
||||
use lithos_llm::catalog::ProviderId;
|
||||
use lithos_llm::types::ReasoningEffort;
|
||||
|
||||
pub(crate) const LONG_VERSION: &str = concat!(
|
||||
env!("CARGO_PKG_VERSION"),
|
||||
|
|
@ -836,7 +837,7 @@ pub(crate) struct ProviderLoginArgs {
|
|||
|
||||
/// LLM provider to authenticate with
|
||||
#[arg(long)]
|
||||
pub(crate) provider: fabro_types::ProviderId,
|
||||
pub(crate) provider: ProviderId,
|
||||
|
||||
/// Read an API key from stdin instead of prompting
|
||||
#[arg(long)]
|
||||
|
|
@ -1728,7 +1729,7 @@ pub(crate) struct InstallGithubArgs {
|
|||
#[derive(Args, Debug, Clone, Default)]
|
||||
pub(crate) struct InstallNonInteractiveArgs {
|
||||
#[arg(long, hide = true)]
|
||||
pub(crate) llm_provider: Option<fabro_types::ProviderId>,
|
||||
pub(crate) llm_provider: Option<ProviderId>,
|
||||
|
||||
#[arg(long, hide = true)]
|
||||
pub(crate) llm_api_key_stdin: bool,
|
||||
|
|
|
|||
|
|
@ -11,10 +11,10 @@ use fabro_llm::ErrorKind;
|
|||
use fabro_llm::gateway::{GatewayAdapter, GatewayError, GatewayTransport};
|
||||
use fabro_llm::lithos_catalog::Catalog;
|
||||
use fabro_mcp::config::McpServerSettings;
|
||||
use fabro_types::ProviderId;
|
||||
use fabro_types::settings::cli::OutputFormat as SettingsOutputFormat;
|
||||
use fabro_types::settings::run::ResolvedMcpEntry;
|
||||
use fabro_util::exit::{self, ErrorExt, ExitClass};
|
||||
use lithos_llm::catalog::ProviderId;
|
||||
|
||||
use crate::args::ExecArgs;
|
||||
use crate::command_context::CommandContext;
|
||||
|
|
|
|||
|
|
@ -37,16 +37,16 @@ use fabro_install::{
|
|||
use fabro_llm::lithos_catalog::{Catalog, CatalogProvider};
|
||||
use fabro_server::serve;
|
||||
use fabro_store::ArtifactStore;
|
||||
use fabro_types::ServerSettings;
|
||||
use fabro_types::settings::server::ServerAuthMethod;
|
||||
use fabro_types::settings::validate_public_url_with_label;
|
||||
use fabro_types::{ProviderId, ServerSettings};
|
||||
use fabro_util::printer::Printer;
|
||||
use fabro_util::terminal::Styles;
|
||||
use fabro_util::version::FABRO_VERSION;
|
||||
use fabro_util::{browser, dev_token, path, session_secret};
|
||||
use fabro_vault::SecretType as VaultSecretType;
|
||||
use futures::future::BoxFuture;
|
||||
use lithos_llm::catalog::builtin;
|
||||
use lithos_llm::catalog::{ProviderId, builtin};
|
||||
use rand::Rng;
|
||||
use tokio::net::TcpListener;
|
||||
use tokio::process::Command as TokioCommand;
|
||||
|
|
|
|||
|
|
@ -2,9 +2,10 @@ use anyhow::{Context, Result, bail};
|
|||
use cli_table::format::{Border, Justify, Separator};
|
||||
use cli_table::{Cell, CellStruct, Color, Style, Table};
|
||||
use fabro_api::types as api_types;
|
||||
use fabro_types::{Model, ModelTestMode, ProviderId};
|
||||
use fabro_types::{Model, ModelTestMode};
|
||||
use fabro_util::terminal::Styles;
|
||||
use futures::{StreamExt, stream};
|
||||
use lithos_llm::catalog::ProviderId;
|
||||
use serde::Serialize;
|
||||
|
||||
use crate::args::{ModelListArgs, ModelTestArgs, ModelsCommand};
|
||||
|
|
@ -513,8 +514,9 @@ impl Default for ModelsCommand {
|
|||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use fabro_types::{ModelControls, ModelCosts, ModelFeatures, ModelLimits, ReasoningEffort};
|
||||
use fabro_types::{ModelControls, ModelCosts, ModelFeatures, ModelLimits};
|
||||
use lithos_llm::catalog::builtin;
|
||||
use lithos_llm::types::ReasoningEffort;
|
||||
|
||||
use super::*;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
use anyhow::{Context, Result};
|
||||
use fabro_api::types;
|
||||
use fabro_auth::{AuthContextRequest, AuthMethod, LoginResult, OPENAI_CODEX_VAULT_SECRET_NAME};
|
||||
use fabro_types::ProviderId;
|
||||
use fabro_util::printer::Printer;
|
||||
use fabro_util::terminal::Styles;
|
||||
use lithos_llm::catalog::ProviderId;
|
||||
use tokio::task::spawn_blocking;
|
||||
|
||||
use crate::args::ProviderLoginArgs;
|
||||
|
|
|
|||
|
|
@ -460,12 +460,13 @@ mod tests {
|
|||
use fabro_agent::{AgentEvent, SandboxEvent};
|
||||
use fabro_types::run_event::CliEnsureCompletedProps;
|
||||
use fabro_types::{
|
||||
MetadataSnapshotFailureKind, MetadataSnapshotPhase, ModelId, ModelRef, ParallelBranchId,
|
||||
SandboxProviderKind, StageId, TokenCounts, fixtures,
|
||||
MetadataSnapshotFailureKind, MetadataSnapshotPhase, ModelRef, ParallelBranchId,
|
||||
SandboxProviderKind, StageId, fixtures,
|
||||
};
|
||||
use fabro_workflow::event::{Event, RunNoticeLevel, to_run_event, to_run_event_at};
|
||||
use fabro_workflow::outcome::billed_model_usage_from_llm;
|
||||
use lithos_llm::catalog::builtin;
|
||||
use lithos_llm::catalog::{ModelId, builtin};
|
||||
use lithos_llm::types::TokenCounts;
|
||||
|
||||
use super::*;
|
||||
use crate::commands::run::run_progress::stage_display::ToolCallStatus;
|
||||
|
|
|
|||
|
|
@ -586,7 +586,7 @@ mod tests {
|
|||
ProviderCommand, ProviderNamespace,
|
||||
};
|
||||
use clap::error::ErrorKind;
|
||||
use lithos_llm::catalog::builtin;
|
||||
use lithos_llm::catalog::{ProviderId, builtin};
|
||||
use temp_env::with_var;
|
||||
use tokio::runtime::Runtime;
|
||||
|
||||
|
|
@ -1202,7 +1202,7 @@ destination = "{destination}"
|
|||
Commands::Provider(ProviderNamespace {
|
||||
command: ProviderCommand::Login(args),
|
||||
}) => {
|
||||
assert_eq!(args.provider, fabro_types::ProviderId::new("bogus"));
|
||||
assert_eq!(args.provider, ProviderId::new("bogus"));
|
||||
}
|
||||
_ => panic!("expected provider login command"),
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,10 +20,9 @@ use fabro_auth::{
|
|||
};
|
||||
use fabro_llm::lithos_catalog::{Catalog, CatalogProvider};
|
||||
use fabro_llm::probe::{self, ApiKeyProbeError, ModelTestStatus};
|
||||
use fabro_types::ProviderId;
|
||||
use fabro_util::printer::Printer;
|
||||
use fabro_util::terminal::Styles;
|
||||
use lithos_llm::catalog::builtin;
|
||||
use lithos_llm::catalog::{ProviderId, builtin};
|
||||
use tokio::task::spawn_blocking;
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -1097,6 +1097,7 @@ mod runs {
|
|||
RunLifecycle, RunLinks, RunOrigin, RunSize, RunTimestamps, StageId, WorkflowRef,
|
||||
WorkflowSettings,
|
||||
};
|
||||
use lithos_llm::catalog::{ModelId, ProviderId};
|
||||
|
||||
use super::ts;
|
||||
|
||||
|
|
@ -1115,7 +1116,7 @@ mod runs {
|
|||
.collect()
|
||||
}
|
||||
|
||||
fn billing_model(provider: fabro_types::ProviderId, model_id: &str) -> BillingModelRef {
|
||||
fn billing_model(provider: ProviderId, model_id: &str) -> BillingModelRef {
|
||||
BillingModelRef {
|
||||
provider,
|
||||
model_id: model_id.into(),
|
||||
|
|
@ -1496,7 +1497,7 @@ mod runs {
|
|||
text: "I'll start by loading the environment configurations for both production and staging to compare them.".into(),
|
||||
model: fabro_types::ModelRef::new(
|
||||
lithos_llm::catalog::builtin::anthropic(),
|
||||
fabro_types::ModelId::new("claude-opus-4.6"),
|
||||
ModelId::new("claude-opus-4.6"),
|
||||
),
|
||||
billing: BilledTokenCounts::default(),
|
||||
cost_source: None,
|
||||
|
|
@ -1572,7 +1573,7 @@ mod runs {
|
|||
text: "I've detected drift in 3 resources between production and staging:\n\n1. **redis.max_connections** — production has 200, staging has 100\n2. **redis.tls** — enabled in production, disabled in staging\n3. **iam.session_duration** — production uses 3600s, staging uses 1800s".into(),
|
||||
model: fabro_types::ModelRef::new(
|
||||
lithos_llm::catalog::builtin::anthropic(),
|
||||
fabro_types::ModelId::new("claude-opus-4.6"),
|
||||
ModelId::new("claude-opus-4.6"),
|
||||
),
|
||||
billing: BilledTokenCounts::default(),
|
||||
cost_source: None,
|
||||
|
|
@ -2074,8 +2075,9 @@ mod workflows {
|
|||
|
||||
mod billing {
|
||||
use fabro_api::types::*;
|
||||
use lithos_llm::catalog::ProviderId;
|
||||
|
||||
fn billing_model(provider: fabro_types::ProviderId, model_id: &str) -> BillingModelRef {
|
||||
fn billing_model(provider: ProviderId, model_id: &str) -> BillingModelRef {
|
||||
BillingModelRef {
|
||||
provider,
|
||||
model_id: model_id.into(),
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ use fabro_llm::probe::{self, ModelTestStatus};
|
|||
use fabro_redact::redact_string;
|
||||
use fabro_sandbox::{DockerSandboxProvider, daytona};
|
||||
use fabro_static::EnvVars;
|
||||
use fabro_types::ProviderId;
|
||||
use fabro_types::settings::ServerAuthMethod;
|
||||
use fabro_types::settings::server::GithubIntegrationStrategy;
|
||||
use fabro_util::check_report::{CheckDetail, CheckResult, CheckSection, CheckStatus};
|
||||
|
|
@ -19,6 +18,7 @@ use fabro_util::dev_token::validate_dev_token_format;
|
|||
use fabro_util::session_secret;
|
||||
use fabro_util::version::FABRO_VERSION;
|
||||
use futures_util::future::join_all;
|
||||
use lithos_llm::catalog::ProviderId;
|
||||
use serde::Serialize;
|
||||
use tokio::time::error::Elapsed;
|
||||
use tokio::time::timeout;
|
||||
|
|
|
|||
|
|
@ -29,13 +29,14 @@ use fabro_llm::probe::{self, ApiKeyProbeError, ModelTestStatus};
|
|||
use fabro_sandbox::daytona;
|
||||
use fabro_static::EnvVars;
|
||||
use fabro_store::ArtifactStore;
|
||||
use fabro_types::ServerSettings;
|
||||
use fabro_types::settings::run::EnvironmentProvider;
|
||||
use fabro_types::settings::server::ObjectStoreSettings;
|
||||
use fabro_types::settings::{is_wildcard_host, validate_public_url_with_label};
|
||||
use fabro_types::{ProviderId, ServerSettings};
|
||||
use fabro_util::version::FABRO_VERSION;
|
||||
use fabro_util::{Home, session_secret};
|
||||
use fabro_vault::SecretType as VaultSecretType;
|
||||
use lithos_llm::catalog::ProviderId;
|
||||
use object_store::aws::resolve_bucket_region;
|
||||
use object_store::path::Path as ObjectStorePath;
|
||||
use object_store::{ClientOptions, RetryConfig};
|
||||
|
|
|
|||
|
|
@ -37,8 +37,8 @@ use fabro_llm::lithos_catalog::Catalog;
|
|||
use fabro_types::settings::interp::{InterpString, ResolveError};
|
||||
use fabro_types::settings::run::{McpServerSettings, RunGoal};
|
||||
use fabro_types::{
|
||||
AutomationRef, GitContext, ManifestPath, ProviderId, RunId, RunProvenance, RunTarget,
|
||||
WorkflowSettings, WorkflowVersionId,
|
||||
AutomationRef, GitContext, ManifestPath, RunId, RunProvenance, RunTarget, WorkflowSettings,
|
||||
WorkflowVersionId,
|
||||
};
|
||||
use fabro_util::workspace_glob::{WorkspaceGlob, WorkspaceGlobError};
|
||||
use fabro_workflow::Error as WorkflowError;
|
||||
|
|
@ -47,6 +47,7 @@ use fabro_workflow::operations::{
|
|||
CreateRunPersistenceMetadata, MaterializedRun, WorkflowInput,
|
||||
};
|
||||
use fabro_workflow::workflow_bundle::{BundledWorkflow, WorkflowBundle};
|
||||
use lithos_llm::catalog::ProviderId;
|
||||
use tokio::task;
|
||||
|
||||
/// One project settings source in the acquired source's path namespace.
|
||||
|
|
|
|||
|
|
@ -30,8 +30,7 @@ use fabro_types::settings::cli::OutputVerbosity;
|
|||
use fabro_types::settings::interp::InterpString;
|
||||
use fabro_types::settings::run::{EnvironmentProvider, McpServerSettings, RunGoal, RunNamespace};
|
||||
use fabro_types::{
|
||||
ManifestPath, ProviderId, RunId, RunNoticeLevel, SandboxProviderKind, ServerSettings,
|
||||
WorkflowSettings,
|
||||
ManifestPath, RunId, RunNoticeLevel, SandboxProviderKind, ServerSettings, WorkflowSettings,
|
||||
};
|
||||
use fabro_util::check_report::{CheckDetail, CheckReport, CheckResult, CheckSection, CheckStatus};
|
||||
use fabro_validate::Severity;
|
||||
|
|
@ -44,6 +43,7 @@ use fabro_workflow::pipeline::Validated;
|
|||
use fabro_workflow::run_materialization::materialize_run_with_ready_providers;
|
||||
use fabro_workflow::workflow_bundle::{BundledWorkflow, ParsedWorkflowConfig, WorkflowBundle};
|
||||
use futures_util::stream::{self, StreamExt};
|
||||
use lithos_llm::catalog::ProviderId;
|
||||
use tokio::process::Command;
|
||||
use tokio::time;
|
||||
|
||||
|
|
@ -1667,8 +1667,8 @@ fn report_to_api(report: &CheckReport) -> types::PreflightCheckReport {
|
|||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use fabro_types::ProviderId;
|
||||
use fabro_workflow::run_materialization::materialize_run;
|
||||
use lithos_llm::catalog::ProviderId;
|
||||
|
||||
use super::*;
|
||||
|
||||
|
|
|
|||
|
|
@ -4,8 +4,9 @@ use std::time::Duration;
|
|||
|
||||
use fabro_llm::{Client, Request};
|
||||
use fabro_template::{TemplateContext, TemplateError};
|
||||
use fabro_types::{Graph, MAX_RUN_TITLE_CHARS, ProviderId, RunId};
|
||||
use fabro_types::{Graph, MAX_RUN_TITLE_CHARS, RunId};
|
||||
use fabro_util::error;
|
||||
use lithos_llm::catalog::ProviderId;
|
||||
use serde::Serialize;
|
||||
use toml::Value as TomlValue;
|
||||
|
||||
|
|
|
|||
|
|
@ -93,9 +93,8 @@ use fabro_types::settings::server::{
|
|||
use fabro_types::{
|
||||
AgentBackend, AskFabro, AskFabroUnavailableReason, BilledTokenCounts, BlobHash, EventBody,
|
||||
InterviewQuestionRecord, ModelRef, ModelTestMode, PairId, PairMessageId, PairTarget,
|
||||
PendingReason, Principal, ProviderId, PullRequestLink, QuestionType, RunControlAction,
|
||||
RunEvent, RunId, RunRunnableSource, RunStatusKind, SandboxProviderKind, ServerSettings,
|
||||
SessionCapability,
|
||||
PendingReason, Principal, PullRequestLink, QuestionType, RunControlAction, RunEvent, RunId,
|
||||
RunRunnableSource, RunStatusKind, SandboxProviderKind, ServerSettings, SessionCapability,
|
||||
};
|
||||
use fabro_util::error::{
|
||||
SharedError, collect_causes, render_compact_with_causes, render_with_causes,
|
||||
|
|
@ -116,6 +115,7 @@ use fabro_workflow::run_lookup::{
|
|||
use fabro_workflow::run_status::{FailureReason, RunStatus, SuccessReason};
|
||||
use fabro_workflow::{Error as WorkflowError, operations, pull_request};
|
||||
use futures_util::future::join_all;
|
||||
use lithos_llm::catalog::ProviderId;
|
||||
use sha2::{Digest, Sha256};
|
||||
use tempfile::NamedTempFile;
|
||||
use tokio::fs;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ use std::sync::Arc;
|
|||
|
||||
use fabro_llm::lithos_catalog::Catalog;
|
||||
use fabro_llm::{ModelSelectionError, Request, selection};
|
||||
use fabro_types::{Message, Role};
|
||||
use lithos_llm::types::{Message, Role};
|
||||
|
||||
use super::super::{
|
||||
ApiError, AppState, CreateCompletionRequest, IntoResponse, Json, ProviderId, RequiredUser,
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ use fabro_llm::lithos_catalog::Catalog;
|
|||
use fabro_llm::probe::{self, ApiKeyProbeError, ModelTestStatus};
|
||||
use fabro_llm::{ModelSelectionError, api, selection};
|
||||
use fabro_redact::redact_string;
|
||||
use fabro_types::ReasoningEffort;
|
||||
use lithos_llm::types::ReasoningEffort;
|
||||
|
||||
use super::super::{
|
||||
ApiError, AppState, FromStr, IntoResponse, Json, MAX_PAGE_OFFSET, ModelTestMode, Path,
|
||||
|
|
|
|||
|
|
@ -848,10 +848,11 @@ mod tests {
|
|||
use chrono::{TimeZone, Utc};
|
||||
use fabro_types::run_event::AgentMessageProps;
|
||||
use fabro_types::{
|
||||
BilledTokenCounts, EventEnvelope, Graph, ModelId, ModelRef, PairMessageId, ProviderId,
|
||||
RunEvent, StageId, WorkflowSettings, fixtures, test_support,
|
||||
BilledTokenCounts, EventEnvelope, Graph, ModelRef, PairMessageId, RunEvent, StageId,
|
||||
WorkflowSettings, fixtures, test_support,
|
||||
};
|
||||
use fabro_workflow::event as workflow_event;
|
||||
use lithos_llm::catalog::{ModelId, ProviderId};
|
||||
use tower::ServiceExt;
|
||||
|
||||
use super::*;
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ use fabro_workflow::command_log::{command_log_path, read_json_string_blob, read_
|
|||
use fabro_workflow::run_status::RunStatus;
|
||||
use fabro_workflow::workflow_bundle::WorkflowBundle;
|
||||
use fabro_workflow::{Error as WorkflowError, operations};
|
||||
use lithos_llm::catalog::ProviderId;
|
||||
use strum::VariantArray as _;
|
||||
use tokio::fs;
|
||||
use tracing::info;
|
||||
|
|
@ -1409,7 +1410,7 @@ struct GeneratedTitleTask {
|
|||
run_inputs: std::collections::HashMap<String, toml::Value>,
|
||||
client: LlmClient,
|
||||
model_id: String,
|
||||
provider_id: fabro_types::ProviderId,
|
||||
provider_id: ProviderId,
|
||||
}
|
||||
|
||||
fn spawn_generated_title_task(task: GeneratedTitleTask) {
|
||||
|
|
|
|||
|
|
@ -36,11 +36,12 @@ use fabro_types::run_event::{
|
|||
};
|
||||
use fabro_types::settings::ModelRef as SettingsModelRef;
|
||||
use fabro_types::{
|
||||
AgentProfileKind, EventBody, EventEnvelope, ProviderId, RunEvent, RunId, SessionDetail,
|
||||
SessionId, ToolDefinition, TurnId,
|
||||
AgentProfileKind, EventBody, EventEnvelope, RunEvent, RunId, SessionDetail, SessionId, TurnId,
|
||||
};
|
||||
use fabro_workflow::handler::llm::api::register_named_fabro_run_tools;
|
||||
use fabro_workflow::services::FabroRunToolServices;
|
||||
use lithos_llm::catalog::ProviderId;
|
||||
use lithos_llm::types::ToolDefinition;
|
||||
use serde_json::Value;
|
||||
use tokio::sync::broadcast::error::RecvError;
|
||||
use tokio::sync::mpsc;
|
||||
|
|
@ -1514,7 +1515,8 @@ mod tests {
|
|||
|
||||
use fabro_agent::config::ToolAccess;
|
||||
use fabro_agent::tool_registry::{RegisteredTool, ToolContext, ToolRegistry, ToolSource};
|
||||
use fabro_types::{ToolCall, ToolDefinition, test_support};
|
||||
use fabro_types::test_support;
|
||||
use lithos_llm::types::{ToolCall, ToolDefinition};
|
||||
|
||||
use super::*;
|
||||
|
||||
|
|
|
|||
|
|
@ -25,17 +25,21 @@ use fabro_types::settings::ServerAuthMethod;
|
|||
use fabro_types::settings::run::{ApprovalMode, EnvironmentProvider};
|
||||
use fabro_types::{
|
||||
AgentBackend, AttrValue, AuthMethod, BlobHash, CommandTermination, FailureCategory,
|
||||
FailureDetail, GitRunTarget, Graph, InterviewQuestionRecord, ModelId, ModelRef, Node, Outcome,
|
||||
ParallelBranchId, QuestionType, ReasoningEffort, RunId, RunSpec, RunTarget,
|
||||
SandboxProviderKind, Speed, StageContextWindowBreakdownItem, StageContextWindowCategory,
|
||||
StageContextWindowCountMethod, StageContextWindowProjection, StageContextWindowStaleness,
|
||||
StageContextWindowWarning, StageModelUsage, StageTiming, SuccessReason, SystemActorKind,
|
||||
TokenCounts, WorkflowSettings, fixtures, test_support,
|
||||
FailureDetail, GitRunTarget, Graph, InterviewQuestionRecord, ModelRef, Node, Outcome,
|
||||
ParallelBranchId, QuestionType, RunId, RunSpec, RunTarget, SandboxProviderKind,
|
||||
StageContextWindowBreakdownItem, StageContextWindowCategory, StageContextWindowCountMethod,
|
||||
StageContextWindowProjection, StageContextWindowStaleness, StageContextWindowWarning,
|
||||
StageModelUsage, StageTiming, SuccessReason, SystemActorKind, WorkflowSettings, fixtures,
|
||||
test_support,
|
||||
};
|
||||
use fabro_util::check_report::CheckStatus;
|
||||
use fabro_workflow::records::CheckpointExt;
|
||||
use httpmock::Method::{GET, POST};
|
||||
use httpmock::MockServer;
|
||||
use lithos_llm::catalog::ModelId;
|
||||
use lithos_llm::types::{
|
||||
ReasoningEffort, ReasoningOutput, Request as LlmRequest, Speed, TokenCounts,
|
||||
};
|
||||
use serde_json::json;
|
||||
use tokio::sync::Notify;
|
||||
use tokio_stream::StreamExt as _;
|
||||
|
|
@ -1903,7 +1907,7 @@ async fn resolve_llm_client_uses_vault_key_without_env_lookup_openai_settings()
|
|||
let response = llm_result
|
||||
.client
|
||||
.complete(
|
||||
fabro_types::Request::builder()
|
||||
LlmRequest::builder()
|
||||
.model("openai/gpt-5.4")
|
||||
.user("Hello")
|
||||
.build()
|
||||
|
|
@ -18317,7 +18321,7 @@ async fn attach_stream_replays_agent_message_reasoning() {
|
|||
cost: None,
|
||||
tool_call_count: 1,
|
||||
context_window: None,
|
||||
reasoning: Some(fabro_types::ReasoningOutput::new(
|
||||
reasoning: Some(ReasoningOutput::new(
|
||||
"inspect the sink first",
|
||||
"read events.rs, then attach",
|
||||
)),
|
||||
|
|
|
|||
|
|
@ -24,9 +24,10 @@ use fabro_static::EnvVars;
|
|||
use fabro_store::{ArtifactStore, Database, test_support as store_test_support};
|
||||
use fabro_types::settings::ServerAuthMethod;
|
||||
use fabro_types::settings::run::EnvironmentProvider;
|
||||
use fabro_types::{AuthMethod, IdpIdentity, ProviderId, ServerSettings};
|
||||
use fabro_types::{AuthMethod, IdpIdentity, ServerSettings};
|
||||
use fabro_vault::{SecretType, Vault};
|
||||
use fabro_workflow::handler::HandlerRegistry;
|
||||
use lithos_llm::catalog::ProviderId;
|
||||
use object_store::memory::InMemory as MemoryObjectStore;
|
||||
use tokio::runtime::Builder as TokioRuntimeBuilder;
|
||||
use tokio_util::sync::CancellationToken;
|
||||
|
|
|
|||
|
|
@ -17,11 +17,11 @@ use fabro_server::install::{
|
|||
InstallAppState, InstallFinishHook, InstallFinishInfo, build_install_router,
|
||||
};
|
||||
use fabro_server::test_support::test_environment_from_storage_dir;
|
||||
use fabro_types::ProviderId;
|
||||
use fabro_util::Home;
|
||||
use fabro_vault::Vault;
|
||||
use httpmock::Method::GET;
|
||||
use httpmock::MockServer;
|
||||
use lithos_llm::catalog::ProviderId;
|
||||
use tokio::time::sleep;
|
||||
use tower::ServiceExt;
|
||||
use tracing::field::{Field, Visit};
|
||||
|
|
|
|||
|
|
@ -2,7 +2,9 @@ use std::sync::Arc;
|
|||
|
||||
use fabro_llm::catalog;
|
||||
use fabro_llm::lithos_catalog::{Catalog, Offering};
|
||||
use fabro_types::{AgentProfileKind, ProviderId, ToolDefinition};
|
||||
use fabro_types::AgentProfileKind;
|
||||
use lithos_llm::catalog::ProviderId;
|
||||
use lithos_llm::types::ToolDefinition;
|
||||
|
||||
use crate::profiles::EnvContext;
|
||||
use crate::sandbox::Sandbox;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
use std::fmt::Write as _;
|
||||
use std::sync::Arc;
|
||||
|
||||
use fabro_types::ToolDefinition;
|
||||
use lithos_llm::types::ToolDefinition;
|
||||
|
||||
use crate::sandbox::Sandbox;
|
||||
use crate::tool_registry::{RegisteredTool, ToolSource};
|
||||
|
|
@ -502,7 +502,8 @@ pub fn make_apply_patch_tool() -> RegisteredTool {
|
|||
mod tests {
|
||||
use std::collections::HashMap;
|
||||
|
||||
use fabro_types::{ContentPart, ToolCall, tool_result_to_json};
|
||||
use fabro_types::tool_result_to_json;
|
||||
use lithos_llm::types::{ContentPart, ToolCall};
|
||||
use tokio::fs;
|
||||
use tokio_util::sync::CancellationToken;
|
||||
|
||||
|
|
|
|||
|
|
@ -18,9 +18,10 @@ use fabro_llm::middleware::{Call, Middleware, Next, Output};
|
|||
use fabro_llm::{Client, ClientOptions, Error as LlmError, catalog};
|
||||
use fabro_mcp::config::McpServerSettings;
|
||||
use fabro_static::EnvVars;
|
||||
use fabro_types::{AgentProfileKind, ModelHandle, ModelId, ProviderId};
|
||||
use fabro_types::AgentProfileKind;
|
||||
use fabro_util::terminal::Styles;
|
||||
use fabro_vault::SecretStore;
|
||||
use lithos_llm::catalog::{ModelHandle, ModelId, ProviderId};
|
||||
use tokio::io::{AsyncWriteExt, stdout};
|
||||
use tokio::signal;
|
||||
|
||||
|
|
|
|||
|
|
@ -368,7 +368,8 @@ mod tests {
|
|||
use fabro_llm::catalog;
|
||||
use fabro_llm::lithos_catalog::{Catalog, Offering};
|
||||
use fabro_llm::test_support::test_catalog;
|
||||
use fabro_types::{TokenCounts, ToolCall, tool_result_from_json};
|
||||
use fabro_types::tool_result_from_json;
|
||||
use lithos_llm::types::{TokenCounts, ToolCall};
|
||||
|
||||
use super::*;
|
||||
use crate::event::Emitter;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@ use std::time::Duration;
|
|||
use fabro_llm::RetryPolicy;
|
||||
use fabro_llm::client::default_retry_policy;
|
||||
use fabro_mcp::config::McpServerSettings;
|
||||
use fabro_types::{AgentProfileKind, PermissionLevel, ReasoningEffort, Speed};
|
||||
use fabro_types::{AgentProfileKind, PermissionLevel};
|
||||
use lithos_llm::types::{ReasoningEffort, Speed};
|
||||
|
||||
/// Callback invoked before each tool execution. Return `Ok(())` to allow,
|
||||
/// `Err(message)` to deny with the given message.
|
||||
|
|
|
|||
|
|
@ -4,10 +4,10 @@ use chrono::Utc;
|
|||
use fabro_llm::Request;
|
||||
use fabro_llm::estimate::{self, EstimateWarning, TokenEstimate};
|
||||
use fabro_types::{
|
||||
Role, StageContextWindowBreakdownItem, StageContextWindowCategory,
|
||||
StageContextWindowCountMethod, StageContextWindowProjection, StageContextWindowStaleness,
|
||||
StageContextWindowWarning, TokenCounts, text_of,
|
||||
StageContextWindowBreakdownItem, StageContextWindowCategory, StageContextWindowCountMethod,
|
||||
StageContextWindowProjection, StageContextWindowStaleness, StageContextWindowWarning, text_of,
|
||||
};
|
||||
use lithos_llm::types::{Role, TokenCounts};
|
||||
|
||||
use crate::memory::MemoryDocument;
|
||||
use crate::native_tool::ToolVocabulary;
|
||||
|
|
@ -372,7 +372,7 @@ fn usage_percent(tokens: u64, denominator: u64) -> f64 {
|
|||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use fabro_types::{Message as LlmMessage, ToolChoice, ToolDefinition};
|
||||
use lithos_llm::types::{Message as LlmMessage, ToolChoice, ToolDefinition};
|
||||
|
||||
use super::*;
|
||||
use crate::tool_registry::ToolDefinitionWithSource;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
use std::collections::BTreeMap;
|
||||
use std::fmt::Write;
|
||||
|
||||
use fabro_types::{ToolCall, ToolResult, tool_call_arguments, tool_result_to_json};
|
||||
use fabro_types::{tool_call_arguments, tool_result_to_json};
|
||||
use lithos_llm::types::{ToolCall, ToolResult};
|
||||
|
||||
use crate::native_tool::NativeTool;
|
||||
use crate::tool_permissions::canonical_tool_name;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
use std::collections::HashSet;
|
||||
|
||||
use fabro_types::{Message as LlmMessage, SessionMessage, TokenCounts};
|
||||
use fabro_types::SessionMessage;
|
||||
use lithos_llm::types::{Message as LlmMessage, TokenCounts};
|
||||
|
||||
use crate::types::Message;
|
||||
|
||||
|
|
@ -164,9 +165,8 @@ mod tests {
|
|||
use std::time::SystemTime;
|
||||
|
||||
use fabro_llm::types::OPENAI_REASONING_KIND;
|
||||
use fabro_types::{
|
||||
ContentPart, ReasoningContent, Role, TokenCounts, ToolCall, text_of, tool_result_from_json,
|
||||
};
|
||||
use fabro_types::{text_of, tool_result_from_json};
|
||||
use lithos_llm::types::{ContentPart, ReasoningContent, Role, TokenCounts, ToolCall};
|
||||
|
||||
use super::*;
|
||||
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ fn is_repeating_pattern(signatures: &[u64], pattern_len: usize) -> bool {
|
|||
mod tests {
|
||||
use std::time::SystemTime;
|
||||
|
||||
use fabro_types::{TokenCounts, ToolCall};
|
||||
use lithos_llm::types::{TokenCounts, ToolCall};
|
||||
|
||||
use super::*;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
use std::sync::Arc;
|
||||
|
||||
use fabro_mcp::connection_manager::{McpConnectionManager, call_result_to_string};
|
||||
use fabro_types::ToolDefinition;
|
||||
use lithos_llm::types::ToolDefinition;
|
||||
|
||||
use crate::tool_registry::{RegisteredTool, ToolSource};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
use std::sync::Arc;
|
||||
|
||||
use fabro_llm::lithos_catalog::Catalog;
|
||||
use fabro_types::{AgentProfileKind, ProviderId};
|
||||
use lithos_llm::catalog::builtin;
|
||||
use fabro_types::AgentProfileKind;
|
||||
use lithos_llm::catalog::{ProviderId, builtin};
|
||||
|
||||
use super::EnvContext;
|
||||
use crate::agent_profile::AgentProfile;
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
use std::sync::Arc;
|
||||
|
||||
use fabro_llm::lithos_catalog::Catalog;
|
||||
use fabro_types::{AgentProfileKind, ProviderId};
|
||||
use lithos_llm::catalog::builtin;
|
||||
use fabro_types::AgentProfileKind;
|
||||
use lithos_llm::catalog::{ProviderId, builtin};
|
||||
|
||||
use super::EnvContext;
|
||||
use crate::agent_profile::AgentProfile;
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@
|
|||
use std::sync::Arc;
|
||||
use std::time::Duration;
|
||||
|
||||
use fabro_types::{ToolDefinition, ToolDefinitionKind};
|
||||
use fabro_util::error as util_error;
|
||||
use lithos_llm::types::{ToolDefinition, ToolDefinitionKind};
|
||||
use serde_json::Value;
|
||||
use tokio::time;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
use std::sync::Arc;
|
||||
|
||||
use fabro_llm::lithos_catalog::Catalog;
|
||||
use fabro_types::{AgentProfileKind, ProviderId};
|
||||
use lithos_llm::catalog::builtin;
|
||||
use fabro_types::AgentProfileKind;
|
||||
use lithos_llm::catalog::{ProviderId, builtin};
|
||||
|
||||
use super::EnvContext;
|
||||
use crate::agent_profile::AgentProfile;
|
||||
|
|
|
|||
|
|
@ -17,8 +17,9 @@
|
|||
use std::sync::Arc;
|
||||
|
||||
use fabro_llm::lithos_catalog::Catalog;
|
||||
use fabro_types::{AgentProfileKind, ProviderId, ToolDefinition};
|
||||
use lithos_llm::catalog::builtin;
|
||||
use fabro_types::AgentProfileKind;
|
||||
use lithos_llm::catalog::{ProviderId, builtin};
|
||||
use lithos_llm::types::ToolDefinition;
|
||||
use serde_json::Value;
|
||||
|
||||
use super::EnvContext;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
use std::sync::Arc;
|
||||
|
||||
use fabro_llm::lithos_catalog::Catalog;
|
||||
use fabro_types::{AgentProfileKind, ProviderId};
|
||||
use fabro_types::AgentProfileKind;
|
||||
use lithos_llm::catalog::ProviderId;
|
||||
|
||||
use super::EnvContext;
|
||||
use crate::agent_profile::AgentProfile;
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ use std::fmt::Write as _;
|
|||
use std::str::FromStr;
|
||||
use std::sync::Arc;
|
||||
|
||||
use fabro_types::ToolDefinition;
|
||||
use lithos_llm::types::ToolDefinition;
|
||||
use serde_json::Value;
|
||||
use strum::EnumString;
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@ use std::collections::HashMap;
|
|||
use std::sync::Arc;
|
||||
|
||||
use fabro_llm::lithos_catalog::Catalog;
|
||||
use fabro_types::{AgentProfileKind, ProviderId};
|
||||
use fabro_types::AgentProfileKind;
|
||||
use lithos_llm::catalog::ProviderId;
|
||||
#[cfg(test)]
|
||||
use lithos_llm::catalog::builtin;
|
||||
|
||||
|
|
@ -220,7 +221,7 @@ macro_rules! impl_base_profile_accessors {
|
|||
self.base.profile_kind
|
||||
}
|
||||
|
||||
fn provider_id(&self) -> ::fabro_types::ProviderId {
|
||||
fn provider_id(&self) -> ::lithos_llm::catalog::ProviderId {
|
||||
self.base.provider_id.clone()
|
||||
}
|
||||
|
||||
|
|
@ -456,7 +457,7 @@ pub fn build_env_context_block_with(env: &dyn Sandbox, ctx: &EnvContext) -> Stri
|
|||
#[cfg(test)]
|
||||
mod tests {
|
||||
use fabro_llm::test_support::{test_catalog, test_catalog_with_overlay};
|
||||
use fabro_types::ToolDefinition;
|
||||
use lithos_llm::types::ToolDefinition;
|
||||
use tokio_util::sync::CancellationToken;
|
||||
|
||||
use super::*;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
use std::sync::Arc;
|
||||
|
||||
use fabro_llm::lithos_catalog::Catalog;
|
||||
use fabro_types::{AgentProfileKind, ProviderId};
|
||||
use lithos_llm::catalog::builtin;
|
||||
use fabro_types::AgentProfileKind;
|
||||
use lithos_llm::catalog::{ProviderId, builtin};
|
||||
|
||||
use super::EnvContext;
|
||||
use crate::agent_profile::AgentProfile;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,8 @@ use std::ops::RangeInclusive;
|
|||
use std::sync::Arc;
|
||||
|
||||
use async_trait::async_trait;
|
||||
use fabro_types::{AgentProfileKind, InterviewOption, QuestionType, ToolDefinition};
|
||||
use fabro_types::{AgentProfileKind, InterviewOption, QuestionType};
|
||||
use lithos_llm::types::ToolDefinition;
|
||||
use serde::Deserialize;
|
||||
use serde_json::json;
|
||||
use tokio_util::sync::CancellationToken;
|
||||
|
|
|
|||
|
|
@ -11,13 +11,17 @@ use fabro_mcp::config::{McpServerSettings, McpTransport};
|
|||
use fabro_mcp::connection_manager::McpConnectionManager;
|
||||
use fabro_mcp::http_transport;
|
||||
use fabro_types::{
|
||||
AgentProfileKind, AgentToolSummary, LlmOutputKind, LlmRetryPhase, Message as LlmMessage,
|
||||
ModelId, ModelRef, PermissionLevel, Principal, ReasoningEffort, Role, SessionMessage,
|
||||
SessionRecord, Speed, StageContextWindowProjection, SteeringMessage, TokenCounts, ToolCall,
|
||||
ToolChoice, UsdMicros, billing,
|
||||
AgentProfileKind, AgentToolSummary, LlmOutputKind, LlmRetryPhase, ModelRef, PermissionLevel,
|
||||
Principal, SessionMessage, SessionRecord, StageContextWindowProjection, SteeringMessage,
|
||||
UsdMicros, billing,
|
||||
};
|
||||
use fabro_util::shell;
|
||||
use futures::StreamExt;
|
||||
use lithos_llm::catalog::{ModelId, ProviderId};
|
||||
use lithos_llm::types::{
|
||||
ContentPart, Message as LlmMessage, ReasoningEffort, Role, Speed, TokenCounts, ToolCall,
|
||||
ToolChoice,
|
||||
};
|
||||
use tokio::sync::{Notify, broadcast};
|
||||
use tokio::time;
|
||||
use tokio_util::sync::CancellationToken;
|
||||
|
|
@ -110,9 +114,9 @@ fn first_output_kind(event: &StreamEvent) -> Option<LlmOutputKind> {
|
|||
StreamEvent::TextDelta { .. } => Some(LlmOutputKind::Text),
|
||||
StreamEvent::ToolCallDelta { .. } => Some(LlmOutputKind::ToolCall),
|
||||
StreamEvent::ContentBlockEnd { part, .. } => match part {
|
||||
fabro_types::ContentPart::Text { .. } => Some(LlmOutputKind::Text),
|
||||
fabro_types::ContentPart::Reasoning(_) => Some(LlmOutputKind::Reasoning),
|
||||
fabro_types::ContentPart::ToolCall(_) => Some(LlmOutputKind::ToolCall),
|
||||
ContentPart::Text { .. } => Some(LlmOutputKind::Text),
|
||||
ContentPart::Reasoning(_) => Some(LlmOutputKind::Reasoning),
|
||||
ContentPart::ToolCall(_) => Some(LlmOutputKind::ToolCall),
|
||||
_ => None,
|
||||
},
|
||||
_ => None,
|
||||
|
|
@ -565,7 +569,7 @@ impl Session {
|
|||
}
|
||||
|
||||
#[must_use]
|
||||
pub fn provider_id(&self) -> fabro_types::ProviderId {
|
||||
pub fn provider_id(&self) -> ProviderId {
|
||||
self.provider_profile.provider_id()
|
||||
}
|
||||
|
||||
|
|
@ -2248,12 +2252,10 @@ mod tests {
|
|||
ContentBlockId, ContentBlockKind, OPENAI_COMPAT_REASONING_DETAILS_KIND, ToolCallKind,
|
||||
};
|
||||
use fabro_llm::{ErrorKind, ResponseStream, RetryPolicy};
|
||||
use fabro_types::{
|
||||
ContentPart, Cost, CostSource, ReasoningOutput, StageContextWindowCountMethod,
|
||||
ToolDefinition, text_of, tool_result_to_json,
|
||||
};
|
||||
use fabro_types::{StageContextWindowCountMethod, text_of, tool_result_to_json};
|
||||
use futures::stream;
|
||||
use lithos_llm::catalog::builtin;
|
||||
use lithos_llm::types::{ContentPart, Cost, CostSource, ReasoningOutput, ToolDefinition};
|
||||
use tokio::time::{sleep, timeout};
|
||||
|
||||
use super::*;
|
||||
|
|
@ -5440,7 +5442,7 @@ mod tests {
|
|||
|
||||
#[tokio::test]
|
||||
async fn compaction_includes_structured_prompt_and_file_tracking() {
|
||||
use fabro_types::ToolDefinition;
|
||||
use lithos_llm::types::ToolDefinition;
|
||||
|
||||
use crate::tool_registry::{RegisteredTool, ToolSource};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use std::sync::Arc;
|
||||
|
||||
use fabro_types::ToolDefinition;
|
||||
use lithos_llm::types::ToolDefinition;
|
||||
use tokio_util::sync::CancellationToken;
|
||||
|
||||
use crate::error::{Error, InterruptReason};
|
||||
|
|
|
|||
|
|
@ -3,9 +3,10 @@ use std::collections::{HashMap, VecDeque};
|
|||
use std::sync::{Arc, Mutex, RwLock, Weak};
|
||||
use std::time::Duration;
|
||||
|
||||
use fabro_types::{INITIAL_SUBAGENT_GENERATION, ToolDefinition};
|
||||
use fabro_types::INITIAL_SUBAGENT_GENERATION;
|
||||
use fabro_util::error as util_error;
|
||||
use futures::future;
|
||||
use lithos_llm::types::ToolDefinition;
|
||||
use tokio::sync::{broadcast, mpsc, oneshot, watch};
|
||||
use tokio::task::{AbortHandle, JoinHandle};
|
||||
use tokio::time::{Instant, timeout_at};
|
||||
|
|
@ -1344,7 +1345,8 @@ pub fn make_close_agent_tool(supervisor: SubAgentSupervisor) -> RegisteredTool {
|
|||
#[cfg(test)]
|
||||
mod tests {
|
||||
use fabro_llm::adapter::ProviderAdapter;
|
||||
use fabro_types::{Role, text_of};
|
||||
use fabro_types::text_of;
|
||||
use lithos_llm::types::Role;
|
||||
use tokio::task::yield_now;
|
||||
use tokio::time;
|
||||
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ fn is_task_reminder(content: &str) -> bool {
|
|||
mod tests {
|
||||
use std::time::SystemTime;
|
||||
|
||||
use fabro_types::{TokenCounts, ToolCall};
|
||||
use lithos_llm::types::{TokenCounts, ToolCall};
|
||||
|
||||
use super::*;
|
||||
fn assistant(tool_name: Option<&str>) -> Message {
|
||||
|
|
|
|||
|
|
@ -10,8 +10,9 @@ use fabro_llm::{
|
|||
Client, ClientOptions, Error as LlmError, FinishReason, Request, Response, ResponseStream,
|
||||
};
|
||||
pub use fabro_sandbox::test_support::{MockSandbox, MutableMockSandbox};
|
||||
use fabro_types::{AgentProfileKind, ContentPart, ModelId, ProviderId, TokenCounts, ToolCall};
|
||||
use lithos_llm::catalog::builtin;
|
||||
use fabro_types::AgentProfileKind;
|
||||
use lithos_llm::catalog::{ModelId, ProviderId, builtin};
|
||||
use lithos_llm::types::{ContentPart, TokenCounts, ToolCall};
|
||||
|
||||
use crate::agent_profile::AgentProfile;
|
||||
use crate::config::SessionOptions;
|
||||
|
|
@ -270,7 +271,7 @@ pub async fn make_session_with_tools_and_config(
|
|||
}
|
||||
|
||||
pub fn make_echo_tool() -> RegisteredTool {
|
||||
use fabro_types::ToolDefinition;
|
||||
use lithos_llm::types::ToolDefinition;
|
||||
RegisteredTool {
|
||||
definition: ToolDefinition::function(
|
||||
"echo",
|
||||
|
|
@ -291,7 +292,7 @@ pub fn make_echo_tool() -> RegisteredTool {
|
|||
}
|
||||
|
||||
pub fn make_error_tool() -> RegisteredTool {
|
||||
use fabro_types::ToolDefinition;
|
||||
use lithos_llm::types::ToolDefinition;
|
||||
RegisteredTool {
|
||||
definition: ToolDefinition::function(
|
||||
"fail_tool",
|
||||
|
|
|
|||
|
|
@ -12,7 +12,8 @@ use std::fmt::Write;
|
|||
use std::str::FromStr;
|
||||
use std::sync::Arc;
|
||||
|
||||
use fabro_types::{TodoListKind, TodoProjection, TodoStatus, TodoUpdatedProps, ToolDefinition};
|
||||
use fabro_types::{TodoListKind, TodoProjection, TodoStatus, TodoUpdatedProps};
|
||||
use lithos_llm::types::ToolDefinition;
|
||||
use serde_json::Value;
|
||||
use strum::{EnumString, IntoStaticStr};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
use std::borrow::Cow;
|
||||
use std::sync::Arc;
|
||||
|
||||
use fabro_types::{ToolCall, ToolInput, ToolResult, tool_call_arguments, tool_result_from_json};
|
||||
use fabro_types::{tool_call_arguments, tool_result_from_json};
|
||||
use futures::future;
|
||||
use lithos_llm::types::{ContentPart, ToolCall, ToolDefinitionKind, ToolInput, ToolResult};
|
||||
use tokio_util::sync::CancellationToken;
|
||||
use tracing::debug;
|
||||
|
||||
|
|
@ -507,7 +508,7 @@ fn retain_tool_result(
|
|||
previous_stats: Option<OutputCaptureStats>,
|
||||
) -> RetainedToolResult {
|
||||
let output_stats = match result.content.as_mut_slice() {
|
||||
[fabro_types::ContentPart::Text { text: output }] => {
|
||||
[ContentPart::Text { text: output }] => {
|
||||
let previously_omitted = previous_stats.map_or(0, |stats| stats.omitted_bytes);
|
||||
let previewed =
|
||||
preview_tool_output(output, MAX_RETAINED_TOOL_OUTPUT_BYTES, previously_omitted);
|
||||
|
|
@ -565,9 +566,7 @@ async fn execute_one_tool(
|
|||
_ => tool_call_arguments(tc),
|
||||
};
|
||||
if matches!(tc.input, ToolInput::Function(_)) {
|
||||
if let fabro_types::ToolDefinitionKind::Function { input_schema } =
|
||||
&tool.definition.kind
|
||||
{
|
||||
if let ToolDefinitionKind::Function { input_schema } = &tool.definition.kind {
|
||||
if let Err(validation_error) = validate_tool_args(input_schema, &arguments) {
|
||||
return ExecutedToolResult {
|
||||
result: error_result(&tc.id, validation_error),
|
||||
|
|
@ -622,9 +621,11 @@ fn truncate_tool_result(
|
|||
config: &SessionOptions,
|
||||
) -> ToolResult {
|
||||
let content = match result.content.as_slice() {
|
||||
[fabro_types::ContentPart::Text { text }] => vec![fabro_types::ContentPart::Text {
|
||||
text: truncate_tool_output(text, tool_name, config),
|
||||
}],
|
||||
[ContentPart::Text { text }] => {
|
||||
vec![ContentPart::Text {
|
||||
text: truncate_tool_output(text, tool_name, config),
|
||||
}]
|
||||
}
|
||||
other => other.to_vec(),
|
||||
};
|
||||
|
||||
|
|
@ -672,7 +673,8 @@ mod tests {
|
|||
|
||||
use async_trait::async_trait;
|
||||
use fabro_types::run_event::{AgentToolCompletedProps, MAX_RUN_EVENT_BODY_BYTES};
|
||||
use fabro_types::{AgentProfileKind, ToolCall, ToolDefinition, tool_result_to_json};
|
||||
use fabro_types::{AgentProfileKind, tool_result_to_json};
|
||||
use lithos_llm::types::{ToolCall, ToolDefinition};
|
||||
use tokio::sync::broadcast;
|
||||
|
||||
use super::*;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@ use std::future::Future;
|
|||
use std::pin::Pin;
|
||||
use std::sync::Arc;
|
||||
|
||||
use fabro_types::{AgentToolCategory, AgentToolSource, AgentToolSummary, ToolDefinition};
|
||||
use fabro_types::{AgentToolCategory, AgentToolSource, AgentToolSummary};
|
||||
use lithos_llm::types::{ToolDefinition, ToolDefinitionKind};
|
||||
use tokio_util::sync::CancellationToken;
|
||||
|
||||
use crate::config::{ToolAccessPolicy, ToolExposureMode};
|
||||
|
|
@ -83,14 +84,14 @@ pub trait ToolDefinitionExt {
|
|||
impl ToolDefinitionExt for ToolDefinition {
|
||||
fn parameters(&self) -> &serde_json::Value {
|
||||
match &self.kind {
|
||||
fabro_types::ToolDefinitionKind::Function { input_schema } => input_schema,
|
||||
ToolDefinitionKind::Function { input_schema } => input_schema,
|
||||
_ => panic!("custom tool '{}' has no parameter schema", self.name),
|
||||
}
|
||||
}
|
||||
|
||||
fn custom_format(&self) -> Option<&serde_json::Value> {
|
||||
match &self.kind {
|
||||
fabro_types::ToolDefinitionKind::Custom { format } => Some(format),
|
||||
ToolDefinitionKind::Custom { format } => Some(format),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,8 +5,9 @@ use std::sync::Arc;
|
|||
use fabro_llm::{Client, Request};
|
||||
#[cfg(test)]
|
||||
use fabro_static::EnvVars;
|
||||
use fabro_types::{ModelHandle, ToolDefinition};
|
||||
use futures::{StreamExt, stream};
|
||||
use lithos_llm::catalog::ModelHandle;
|
||||
use lithos_llm::types::ToolDefinition;
|
||||
use tokio::task;
|
||||
|
||||
use crate::config::NativeToolOptions;
|
||||
|
|
@ -732,8 +733,8 @@ mod tests {
|
|||
use std::collections::HashMap;
|
||||
|
||||
use fabro_llm::adapter::ProviderAdapter;
|
||||
use fabro_types::{CommandTermination, ModelId};
|
||||
use lithos_llm::catalog::builtin;
|
||||
use fabro_types::CommandTermination;
|
||||
use lithos_llm::catalog::{ModelId, builtin};
|
||||
use tokio::sync::broadcast;
|
||||
use tokio_util::sync::CancellationToken;
|
||||
|
||||
|
|
|
|||
|
|
@ -3,9 +3,12 @@ use std::time::SystemTime;
|
|||
use chrono::{DateTime, Utc};
|
||||
use fabro_llm::ErrorData;
|
||||
use fabro_types::{
|
||||
CommandTermination, ContentPart, Cost, ExecOutputTail, LlmOutputKind, LlmRetryPhase,
|
||||
Message as LlmMessage, ModelRef, ReasoningOutput, Role, SessionMessage, Speed,
|
||||
StageContextWindowProjection, TokenCounts, ToolCall, ToolResult,
|
||||
CommandTermination, ExecOutputTail, LlmOutputKind, LlmRetryPhase, ModelRef, SessionMessage,
|
||||
StageContextWindowProjection,
|
||||
};
|
||||
use lithos_llm::types::{
|
||||
ContentPart, Cost, Message as LlmMessage, ReasoningOutput, Role, Speed, TokenCounts, ToolCall,
|
||||
ToolResult,
|
||||
};
|
||||
use serde::de::DeserializeOwned;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
|
@ -817,8 +820,8 @@ pub struct SessionEvent {
|
|||
#[cfg(test)]
|
||||
mod tests {
|
||||
use fabro_llm::{ErrorKind, RetryClassification};
|
||||
use fabro_types::{CostSource, ModelId, ProviderId};
|
||||
use lithos_llm::catalog::builtin;
|
||||
use lithos_llm::catalog::{ModelId, ProviderId, builtin};
|
||||
use lithos_llm::types::CostSource;
|
||||
|
||||
use super::*;
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ use std::fmt::Write;
|
|||
use std::sync::OnceLock;
|
||||
use std::time::Duration;
|
||||
|
||||
use fabro_types::ToolDefinition;
|
||||
use lithos_llm::types::ToolDefinition;
|
||||
|
||||
use crate::config::ToolSecrets;
|
||||
use crate::tool_registry::{RegisteredTool, ToolSource};
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@ use fabro_llm::lithos_catalog::Catalog;
|
|||
use fabro_llm::test_support::client_from_env;
|
||||
use fabro_llm::{Client, ClientOptions, catalog};
|
||||
use fabro_test::{EnvVars, TwinScenario, TwinScenarios, TwinToolCall, twin_openai};
|
||||
use fabro_types::{ModelHandle, ModelId, ProviderId};
|
||||
use lithos_llm::catalog::builtin;
|
||||
use lithos_llm::catalog::{ModelHandle, ModelId, ProviderId, builtin};
|
||||
use lithos_llm::types::ReasoningEffort;
|
||||
|
||||
type Provider = ProviderId;
|
||||
|
||||
|
|
@ -786,7 +786,7 @@ macro_rules! reasoning_effort_tests {
|
|||
async fn $test_name() {
|
||||
let tmp = tempfile::tempdir().expect("failed to create tempdir");
|
||||
let config = SessionOptions {
|
||||
reasoning_effort: Some(fabro_types::ReasoningEffort::Low),
|
||||
reasoning_effort: Some(ReasoningEffort::Low),
|
||||
..SessionOptions::default()
|
||||
};
|
||||
let mut session =
|
||||
|
|
|
|||
|
|
@ -11,7 +11,8 @@ use fabro_llm::lithos_catalog::Catalog;
|
|||
use fabro_llm::{Client, ClientOptions, Request};
|
||||
use fabro_redact::redacted_url_for_log;
|
||||
use fabro_types::settings::{InterpString, ResolveCtx, ResolveError};
|
||||
use fabro_types::{Message, Role, ToolCall, tool_call_arguments, tool_result_from_json};
|
||||
use fabro_types::{tool_call_arguments, tool_result_from_json};
|
||||
use lithos_llm::types::{ContentPart, Message, Role, ToolCall};
|
||||
use tokio::process::Command as TokioCommand;
|
||||
use tokio::time::timeout as tokio_timeout;
|
||||
use tokio_util::sync::CancellationToken;
|
||||
|
|
@ -457,7 +458,7 @@ impl HookExecutorImpl {
|
|||
true,
|
||||
),
|
||||
};
|
||||
results.push(fabro_types::ContentPart::ToolResult(result));
|
||||
results.push(ContentPart::ToolResult(result));
|
||||
}
|
||||
messages.push(Message::new(Role::Tool, results));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,11 +5,9 @@
|
|||
|
||||
use std::collections::HashSet;
|
||||
|
||||
use fabro_types::{
|
||||
Model, ModelControls, ModelCosts, ModelFeatures, ModelLimits, Provider, ProviderId,
|
||||
ReasoningEffort,
|
||||
};
|
||||
use lithos_llm::catalog::{Catalog, CatalogProvider, Offering};
|
||||
use fabro_types::{Model, ModelControls, ModelCosts, ModelFeatures, ModelLimits, Provider};
|
||||
use lithos_llm::catalog::{Catalog, CatalogProvider, Offering, ProviderId};
|
||||
use lithos_llm::types::ReasoningEffort;
|
||||
|
||||
const USD_MICROS_PER_USD: f64 = 1_000_000.0;
|
||||
|
||||
|
|
|
|||
|
|
@ -3,9 +3,8 @@
|
|||
use std::sync::Arc;
|
||||
use std::time::Duration;
|
||||
|
||||
use fabro_types::ProviderId;
|
||||
use lithos_llm::adapter::ProviderAdapter;
|
||||
use lithos_llm::catalog::Catalog;
|
||||
use lithos_llm::catalog::{Catalog, ProviderId};
|
||||
use lithos_llm::client::{Client, ClientBuildError, ClientBuilder, ProviderBuildIssue};
|
||||
use lithos_llm::credentials::{CredentialError, CredentialProvider};
|
||||
use lithos_llm::middleware::{
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
//! lithos `Error` and `ErrorData` themselves. What stays here is the loop and
|
||||
//! restart detector's signature format, which names Fabro's own categories.
|
||||
|
||||
use fabro_types::ProviderId;
|
||||
use lithos_llm::catalog::ProviderId;
|
||||
use lithos_llm::types::{ErrorData, ErrorKind};
|
||||
|
||||
/// A stable `category|provider|detail` string for loop and restart detection.
|
||||
|
|
|
|||
|
|
@ -4,9 +4,10 @@ use std::sync::Arc;
|
|||
use std::time::Duration;
|
||||
|
||||
use fabro_auth::ApiKeyCredentialSource;
|
||||
use fabro_types::{ModelTestMode, ProviderId, ReasoningEffort};
|
||||
use lithos_llm::catalog::Catalog;
|
||||
use fabro_types::ModelTestMode;
|
||||
use lithos_llm::catalog::{Catalog, ProviderId};
|
||||
use lithos_llm::client::{Client, ProbeOptions, ProbeOutcome};
|
||||
use lithos_llm::types::ReasoningEffort;
|
||||
use strum::IntoStaticStr;
|
||||
|
||||
use crate::client::{ClientOptions, LlmSetupError, build_client};
|
||||
|
|
|
|||
|
|
@ -19,8 +19,7 @@
|
|||
use std::collections::HashSet;
|
||||
use std::fmt;
|
||||
|
||||
use fabro_types::{ModelId, ProviderId};
|
||||
use lithos_llm::catalog::{Catalog, Offering};
|
||||
use lithos_llm::catalog::{Catalog, ModelId, Offering, ProviderId};
|
||||
use thiserror::Error;
|
||||
|
||||
/// A provider/model pair one of the selection functions chose.
|
||||
|
|
|
|||
|
|
@ -7,15 +7,14 @@ use std::time::Duration;
|
|||
use async_trait::async_trait;
|
||||
use fabro_auth::test_support::env_credential_source;
|
||||
use fabro_config::LlmLayer;
|
||||
use fabro_types::{ContentPart, ModelId, ProviderId, TokenCounts};
|
||||
use futures::stream;
|
||||
use lithos_llm::adapter::{ProviderAdapter, ResolvedCall};
|
||||
use lithos_llm::catalog::{AdapterId, Catalog};
|
||||
use lithos_llm::catalog::{AdapterId, Catalog, ModelId, ProviderId};
|
||||
use lithos_llm::client::Client;
|
||||
use lithos_llm::middleware::RetryPolicy;
|
||||
use lithos_llm::types::{
|
||||
ContentBlockId, ContentBlockKind, Error, FinishReason, Response, ResponseStream, StreamEvent,
|
||||
ToolCallKind,
|
||||
ContentBlockId, ContentBlockKind, ContentPart, Error, FinishReason, Response, ResponseStream,
|
||||
StreamEvent, TokenCounts, ToolCallKind, ToolInput,
|
||||
};
|
||||
|
||||
use crate::client::{ClientOptions, build_client, build_offline_client};
|
||||
|
|
@ -94,7 +93,7 @@ pub fn response_to_stream(response: Response) -> ResponseStream {
|
|||
id: call.id.clone(),
|
||||
name: Some(call.name.clone()),
|
||||
kind: match call.input {
|
||||
fabro_types::ToolInput::Custom(_) => ToolCallKind::Custom,
|
||||
ToolInput::Custom(_) => ToolCallKind::Custom,
|
||||
_ => ToolCallKind::Function,
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ test-support = ["dep:fabro-db"]
|
|||
[dependencies]
|
||||
fabro-db = { path = "../../foundation/fabro-db", optional = true }
|
||||
fabro-types = { path = "../../foundation/fabro-types" }
|
||||
lithos-llm = { workspace = true, features = ["runtime"] }
|
||||
fabro-util = { path = "../../foundation/fabro-util" }
|
||||
hex.workspace = true
|
||||
slatedb.workspace = true
|
||||
|
|
|
|||
|
|
@ -1759,15 +1759,16 @@ mod tests {
|
|||
AgentBackend, AgentControlState, AttrValue, AutomationRef, BilledModelUsage,
|
||||
BilledTokenCounts, BlobHash, BlockedReason, Checkpoint, CheckpointRecord,
|
||||
CommandTermination, EventBody, FailureCategory, FailureDetail, FailureReason, Graph,
|
||||
McpServerStatus, ModelId, Node, Outcome, ParallelBranchId, PendingReason, PermissionLevel,
|
||||
ProviderId, PullRequestCreationStatus, PullRequestLink, QuestionType, ReasoningEffort,
|
||||
RunApprovalState, RunBillingSummary, RunControlAction, RunDiff, RunEvent, RunSize, RunSpec,
|
||||
RunStatus, Speed, StageContextWindowBreakdownItem, StageContextWindowCategory,
|
||||
StageContextWindowCountMethod, StageContextWindowProjection, StageContextWindowStaleness,
|
||||
StageContextWindowWarning, StageHandler, StageModelUsage, StageOutcome, StageState,
|
||||
StageTiming, SubAgentStatus, SuccessReason, WorkflowSettings, first_event_seq, fixtures,
|
||||
test_support,
|
||||
McpServerStatus, Node, Outcome, ParallelBranchId, PendingReason, PermissionLevel,
|
||||
PullRequestCreationStatus, PullRequestLink, QuestionType, RunApprovalState,
|
||||
RunBillingSummary, RunControlAction, RunDiff, RunEvent, RunSize, RunSpec, RunStatus,
|
||||
StageContextWindowBreakdownItem, StageContextWindowCategory, StageContextWindowCountMethod,
|
||||
StageContextWindowProjection, StageContextWindowStaleness, StageContextWindowWarning,
|
||||
StageHandler, StageModelUsage, StageOutcome, StageState, StageTiming, SubAgentStatus,
|
||||
SuccessReason, WorkflowSettings, first_event_seq, fixtures, test_support,
|
||||
};
|
||||
use lithos_llm::catalog::{ModelId, ProviderId};
|
||||
use lithos_llm::types::{ReasoningEffort, Speed};
|
||||
use serde_json::json;
|
||||
|
||||
use super::{RunProjection, RunProjectionReducer, build_summary};
|
||||
|
|
@ -1782,9 +1783,8 @@ mod tests {
|
|||
AgentLlmFirstOutputProps, AgentLlmRetryProps, AgentLlmStartedProps,
|
||||
AgentToolCompletedProps, AgentToolStartedProps,
|
||||
};
|
||||
use fabro_types::{
|
||||
LlmOutputKind, LlmRetryPhase, ModelRef, Speed, StageOutcome, StageProjection,
|
||||
};
|
||||
use fabro_types::{LlmOutputKind, LlmRetryPhase, ModelRef, StageOutcome, StageProjection};
|
||||
use lithos_llm::types::Speed;
|
||||
|
||||
use super::*;
|
||||
|
||||
|
|
@ -7565,9 +7565,8 @@ mod tests {
|
|||
use fabro_types::run_event::{
|
||||
AgentErrorProps, AgentLlmFirstOutputProps, AgentLlmRetryProps, AgentLlmStartedProps,
|
||||
};
|
||||
use fabro_types::{
|
||||
LlmOutputKind, LlmRetryPhase, ModelRef, Speed, StageInferenceProjection,
|
||||
};
|
||||
use fabro_types::{LlmOutputKind, LlmRetryPhase, ModelRef, StageInferenceProjection};
|
||||
use lithos_llm::types::Speed;
|
||||
|
||||
use super::*;
|
||||
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@ pub use fabro_types::billing_rollup::{
|
|||
#[cfg(test)]
|
||||
mod tests {
|
||||
use fabro_types::{
|
||||
AttrValue, BilledTokenCounts, Graph, ModelId, ModelRef, Node, RunProjection, RunSpec,
|
||||
AttrValue, BilledTokenCounts, Graph, ModelRef, Node, RunProjection, RunSpec,
|
||||
StageCompletion, StageOutcome, first_event_seq, test_support,
|
||||
};
|
||||
use lithos_llm::catalog::builtin;
|
||||
use lithos_llm::catalog::{ModelId, builtin};
|
||||
|
||||
use super::billing_rollup_from_projection;
|
||||
use crate::test_support::test_usage;
|
||||
|
|
|
|||
|
|
@ -1461,16 +1461,17 @@ mod tests {
|
|||
use std::collections::BTreeMap;
|
||||
|
||||
use ::fabro_types::{
|
||||
AutomationRef, EventBody, FailureReason, ModelId, ModelRef, ParallelBranchId, Principal,
|
||||
ProviderId, RunNoticeCode, RunNoticeLevel, RunProvenance, StageId, SystemActorKind,
|
||||
TokenCounts as LlmTokenCounts, fixtures, run_event as fabro_types, test_support,
|
||||
AutomationRef, EventBody, FailureReason, ModelRef, ParallelBranchId, Principal,
|
||||
RunNoticeCode, RunNoticeLevel, RunProvenance, StageId, SystemActorKind, fixtures,
|
||||
run_event as fabro_types, test_support,
|
||||
};
|
||||
use chrono::Utc;
|
||||
use fabro_agent::{
|
||||
AgentEvent, McpToolSummary, MemoryFileSummary, SandboxEvent, SkillActivationSource,
|
||||
SkillSummary,
|
||||
};
|
||||
use lithos_llm::catalog::builtin;
|
||||
use lithos_llm::catalog::{ModelId, ProviderId, builtin};
|
||||
use lithos_llm::types::{Cost, CostSource, ReasoningOutput, TokenCounts as LlmTokenCounts};
|
||||
|
||||
use super::*;
|
||||
use crate::error::Error;
|
||||
|
|
@ -2593,10 +2594,10 @@ mod tests {
|
|||
output: 34,
|
||||
..LlmTokenCounts::default()
|
||||
},
|
||||
cost: Some(::fabro_types::Cost {
|
||||
cost: Some(Cost {
|
||||
usd_micros: 125_000,
|
||||
|
||||
source: ::fabro_types::CostSource::Provider,
|
||||
source: CostSource::Provider,
|
||||
}),
|
||||
tool_call_count: 0,
|
||||
context_window: None,
|
||||
|
|
@ -2611,10 +2612,7 @@ mod tests {
|
|||
panic!("expected agent message body");
|
||||
};
|
||||
assert_eq!(message.billing.total_usd_micros, Some(125_000));
|
||||
assert_eq!(
|
||||
message.cost_source,
|
||||
Some(::fabro_types::CostSource::Provider)
|
||||
);
|
||||
assert_eq!(message.cost_source, Some(CostSource::Provider));
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
@ -2676,7 +2674,7 @@ mod tests {
|
|||
cost: None,
|
||||
tool_call_count: 1,
|
||||
context_window: None,
|
||||
reasoning: Some(::fabro_types::ReasoningOutput::new(
|
||||
reasoning: Some(ReasoningOutput::new(
|
||||
"inspect the conversion first",
|
||||
"read convert.rs, then the sink",
|
||||
)),
|
||||
|
|
|
|||
|
|
@ -4,12 +4,13 @@ use ::fabro_types::{
|
|||
AutomationRef, BilledTokenCounts, BlobHash, BlockedReason, CommandTermination, DiffSummary,
|
||||
FailureReason, ForkSourceRef, GitContext, PairId, PairMessageId, PairSystemMessageKind,
|
||||
PairTarget, ParallelBranchId, ParallelBranchResult, PendingReason, PermissionLevel, Principal,
|
||||
PullRequestCreationId, PullRequestLink, ReasoningEffort, ReviewTarget, RunFailure, RunId,
|
||||
RunNoticeLevel, RunPairEndedReason, RunPairFailedReason, RunProvenance, RunRunnableSource,
|
||||
RunTarget, RunTiming, SandboxProviderKind, Speed, StageId, StageOutcome, StageTiming,
|
||||
SuccessReason, WorkflowVersionId, run_event as fabro_types,
|
||||
PullRequestCreationId, PullRequestLink, ReviewTarget, RunFailure, RunId, RunNoticeLevel,
|
||||
RunPairEndedReason, RunPairFailedReason, RunProvenance, RunRunnableSource, RunTarget,
|
||||
RunTiming, SandboxProviderKind, StageId, StageOutcome, StageTiming, SuccessReason,
|
||||
WorkflowVersionId, run_event as fabro_types,
|
||||
};
|
||||
use fabro_agent::{AgentEvent, SandboxEvent};
|
||||
use lithos_llm::types::{ReasoningEffort, Speed};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::error::{Error, run_failure_from_error};
|
||||
|
|
|
|||
|
|
@ -30,12 +30,10 @@ pub fn event_payload_from_redacted_json(line: &str, run_id: &RunId) -> Result<Ev
|
|||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use ::fabro_types::{
|
||||
ModelId, ModelRef, ReasoningOutput, TokenCounts as LlmTokenCounts, fixtures,
|
||||
run_event as fabro_types,
|
||||
};
|
||||
use ::fabro_types::{ModelRef, fixtures, run_event as fabro_types};
|
||||
use fabro_agent::AgentEvent;
|
||||
use lithos_llm::catalog::builtin;
|
||||
use lithos_llm::catalog::{ModelId, builtin};
|
||||
use lithos_llm::types::{ReasoningOutput, TokenCounts as LlmTokenCounts};
|
||||
|
||||
use super::*;
|
||||
use crate::event::{Event, to_run_event};
|
||||
|
|
|
|||
|
|
@ -296,8 +296,10 @@ mod tests {
|
|||
use std::sync::Arc;
|
||||
use std::sync::atomic::{AtomicUsize, Ordering};
|
||||
|
||||
use ::fabro_types::{Graph, ModelId, RunNoticeLevel, WorkflowSettings, fixtures};
|
||||
use ::fabro_types::{Graph, RunNoticeLevel, WorkflowSettings, fixtures};
|
||||
use fabro_types::test_support;
|
||||
use lithos_llm::catalog::ModelId;
|
||||
use lithos_llm::types::{ReasoningOutput, TokenCounts};
|
||||
use tokio::sync::Mutex as AsyncMutex;
|
||||
|
||||
use super::*;
|
||||
|
|
@ -393,11 +395,11 @@ mod tests {
|
|||
::lithos_llm::catalog::builtin::openai(),
|
||||
ModelId::new("gpt-5.4"),
|
||||
),
|
||||
usage: ::fabro_types::TokenCounts::default(),
|
||||
usage: TokenCounts::default(),
|
||||
cost: None,
|
||||
tool_call_count: 1,
|
||||
context_window: None,
|
||||
reasoning: Some(::fabro_types::ReasoningOutput::new(
|
||||
reasoning: Some(ReasoningOutput::new(
|
||||
"inspect the sink first",
|
||||
"write the line, then read it back",
|
||||
)),
|
||||
|
|
|
|||
|
|
@ -446,7 +446,8 @@ mod tests {
|
|||
|
||||
use fabro_graphviz::graph::AttrValue;
|
||||
use fabro_store::{Database, RunDatabase, StageId};
|
||||
use fabro_types::{ReasoningEffort, Speed, fixtures, test_support};
|
||||
use fabro_types::{fixtures, test_support};
|
||||
use lithos_llm::types::{ReasoningEffort, Speed};
|
||||
use object_store::memory::InMemory;
|
||||
use tempfile::TempDir;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
use std::sync::Arc;
|
||||
use std::sync::atomic::{AtomicBool, Ordering};
|
||||
|
||||
use fabro_types::{PermissionLevel, ReasoningEffort, SessionCapability, Speed, StageId};
|
||||
use fabro_types::{PermissionLevel, SessionCapability, StageId};
|
||||
use lithos_llm::types::{ReasoningEffort, Speed};
|
||||
|
||||
use crate::error::Error;
|
||||
use crate::event::{Emitter, Event};
|
||||
|
|
|
|||
|
|
@ -18,9 +18,12 @@ use fabro_llm::{Client, ClientOptions, ErrorData, FallbackTarget, Request, Respo
|
|||
use fabro_mcp::config::McpServerSettings;
|
||||
use fabro_types::settings::run::RunModelControls;
|
||||
use fabro_types::{
|
||||
AgentProfileKind, FailoverProps, Message, ModelHandle, ModelId, ModelRef, PermissionLevel,
|
||||
ProviderId, ReasoningEffort, Role, RunId, SessionCapability, Speed, StageId, StageTiming,
|
||||
TokenCounts, ToolDefinition as LlmToolDefinition, UsdMicros, billing,
|
||||
AgentProfileKind, FailoverProps, ModelRef, PermissionLevel, RunId, SessionCapability, StageId,
|
||||
StageTiming, UsdMicros, billing,
|
||||
};
|
||||
use lithos_llm::catalog::{ModelHandle, ModelId, ProviderId};
|
||||
use lithos_llm::types::{
|
||||
Message, ReasoningEffort, Role, Speed, TokenCounts, ToolDefinition as LlmToolDefinition,
|
||||
};
|
||||
use serde::de::DeserializeOwned;
|
||||
use tokio::sync::mpsc;
|
||||
|
|
@ -1899,7 +1902,7 @@ mod tests {
|
|||
use fabro_llm::{ErrorKind, ResponseStream, RetryClassification};
|
||||
use fabro_tool::FabroToolBackend;
|
||||
use fabro_types::{
|
||||
ContentPart, EventEnvelope, FailureReason, Run, RunId, RunLifecycle, RunLinks, RunOrigin,
|
||||
EventEnvelope, FailureReason, Run, RunId, RunLifecycle, RunLinks, RunOrigin,
|
||||
RunPairStatusResponse, RunProjection, RunStatus, RunTimestamps, SuccessReason, WorkflowRef,
|
||||
test_support,
|
||||
};
|
||||
|
|
@ -1908,6 +1911,7 @@ mod tests {
|
|||
use httpmock::Method::POST;
|
||||
use httpmock::MockServer;
|
||||
use lithos_llm::catalog::builtin;
|
||||
use lithos_llm::types::ContentPart;
|
||||
use tokio::sync::RwLock as AsyncRwLock;
|
||||
use tokio_util::sync::CancellationToken;
|
||||
|
||||
|
|
|
|||
|
|
@ -589,8 +589,9 @@ fn build_summary_preamble(
|
|||
#[cfg(test)]
|
||||
mod tests {
|
||||
use fabro_graphviz::graph::AttrValue;
|
||||
use fabro_types::{ModelId, ModelRef, TokenCounts};
|
||||
use lithos_llm::catalog::builtin;
|
||||
use fabro_types::ModelRef;
|
||||
use lithos_llm::catalog::{ModelId, builtin};
|
||||
use lithos_llm::types::TokenCounts;
|
||||
|
||||
use super::*;
|
||||
use crate::outcome::{BilledModelUsage, billed_model_usage_from_llm};
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ mod tests {
|
|||
use async_trait::async_trait;
|
||||
use fabro_agent::{LocalSandbox, Sandbox};
|
||||
use fabro_graphviz::graph::{AttrValue, Node};
|
||||
use fabro_types::{ReasoningEffort, Speed};
|
||||
use lithos_llm::types::{ReasoningEffort, Speed};
|
||||
use tokio_util::sync::CancellationToken;
|
||||
|
||||
use super::*;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
use fabro_graphviz::graph::{self, Node};
|
||||
use fabro_llm::lithos_catalog::Catalog;
|
||||
use fabro_llm::{ModelSelectionError, catalog, selection};
|
||||
use fabro_types::{AgentBackend, AgentProfileKind, ProviderId};
|
||||
use fabro_types::{AgentBackend, AgentProfileKind};
|
||||
use lithos_llm::catalog::ProviderId;
|
||||
|
||||
use crate::error::Error;
|
||||
|
||||
|
|
|
|||
|
|
@ -221,7 +221,9 @@ mod tests {
|
|||
|
||||
use fabro_graphviz::graph::AttrValue;
|
||||
use fabro_store::{Database, RunDatabase, StageId};
|
||||
use fabro_types::{ReasoningEffort, Speed, fixtures, test_support};
|
||||
use fabro_types::{fixtures, test_support};
|
||||
use lithos_llm::catalog::ProviderId;
|
||||
use lithos_llm::types::{ReasoningEffort, Speed};
|
||||
use object_store::memory::InMemory;
|
||||
use tempfile::TempDir;
|
||||
|
||||
|
|
@ -722,7 +724,7 @@ mod tests {
|
|||
)))
|
||||
.with_catalog_context(
|
||||
Arc::clone(&catalog),
|
||||
fabro_types::ProviderId::new("acme"),
|
||||
ProviderId::new("acme"),
|
||||
"acme-claude".to_string(),
|
||||
);
|
||||
|
||||
|
|
@ -796,7 +798,7 @@ mod tests {
|
|||
)))
|
||||
.with_catalog_context(
|
||||
Arc::clone(&catalog),
|
||||
fabro_types::ProviderId::new("acme"),
|
||||
ProviderId::new("acme"),
|
||||
"acme-claude".to_string(),
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,9 @@ use std::collections::{BTreeMap, HashMap, HashSet};
|
|||
use fabro_llm::lithos_catalog::{Catalog, Offering};
|
||||
use fabro_llm::{FallbackTarget, ModelSelectionError, selection};
|
||||
use fabro_types::settings::{ModelRef, ResolvedModelRef};
|
||||
use fabro_types::{ProviderId, ReasoningEffort, RunNoticeCode, RunNoticeLevel};
|
||||
use fabro_types::{RunNoticeCode, RunNoticeLevel};
|
||||
use lithos_llm::catalog::ProviderId;
|
||||
use lithos_llm::types::ReasoningEffort;
|
||||
|
||||
use crate::Error;
|
||||
|
||||
|
|
@ -407,7 +409,7 @@ mod tests {
|
|||
use fabro_llm::FallbackTarget;
|
||||
use fabro_llm::lithos_catalog::Catalog;
|
||||
use fabro_llm::test_support::test_catalog_with_overlay;
|
||||
use fabro_types::ProviderId;
|
||||
use lithos_llm::catalog::ProviderId;
|
||||
|
||||
use super::{ModelFallbackNotice, resolve_model_fallbacks};
|
||||
|
||||
|
|
|
|||
|
|
@ -16,10 +16,11 @@ use fabro_llm::lithos_catalog::Catalog;
|
|||
use fabro_store::{BlobStore, Database};
|
||||
use fabro_template::TemplateContext;
|
||||
use fabro_types::{
|
||||
AutomationRef, BlobHash, ForkSourceRef, GitContext, ManifestPath, ProviderId, RunId,
|
||||
RunProvenance, RunTarget, WorkflowSettings, WorkflowVersionId,
|
||||
AutomationRef, BlobHash, ForkSourceRef, GitContext, ManifestPath, RunId, RunProvenance,
|
||||
RunTarget, WorkflowSettings, WorkflowVersionId,
|
||||
};
|
||||
use fabro_util::json::normalize_json_value;
|
||||
use lithos_llm::catalog::ProviderId;
|
||||
use tokio::task::spawn_blocking;
|
||||
|
||||
use super::source::{ResolveWorkflowInput, WorkflowInput, resolve_workflow};
|
||||
|
|
|
|||
|
|
@ -24,11 +24,12 @@ use fabro_types::settings::run::{
|
|||
RunPrepareSettings as ResolvedRunPrepareSettings,
|
||||
};
|
||||
use fabro_types::{
|
||||
ManifestPath, ProviderId, RunId, RunRunnableSource, RunSpec, RunTarget, SandboxProviderKind,
|
||||
ManifestPath, RunId, RunRunnableSource, RunSpec, RunTarget, SandboxProviderKind,
|
||||
TargetValidationError,
|
||||
};
|
||||
use fabro_util::error::collect_chain;
|
||||
use fabro_vault::Vault;
|
||||
use lithos_llm::catalog::ProviderId;
|
||||
use tokio::runtime::Handle;
|
||||
use tokio::sync::RwLock as AsyncRwLock;
|
||||
use tokio::{fs, time};
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@ use std::path::PathBuf;
|
|||
use std::sync::Arc;
|
||||
|
||||
use fabro_llm::lithos_catalog::Catalog;
|
||||
use fabro_types::{ProviderId, WorkflowSettings};
|
||||
use fabro_types::WorkflowSettings;
|
||||
use lithos_llm::catalog::ProviderId;
|
||||
|
||||
use super::create::{configured_default_provider, preprocess_and_validate, template_context};
|
||||
use super::source::{ResolveWorkflowInput, WorkflowInput, resolve_workflow};
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@ pub use fabro_core::outcome::{
|
|||
};
|
||||
use fabro_llm::lithos_catalog::Catalog;
|
||||
pub use fabro_types::BilledModelUsage;
|
||||
use fabro_types::{BilledTokenCounts, ModelRef, TokenCounts};
|
||||
use fabro_types::{BilledTokenCounts, ModelRef};
|
||||
use lithos_llm::types::TokenCounts;
|
||||
|
||||
use crate::error::{Error, FailureSignature, classify_failure_reason};
|
||||
|
||||
|
|
@ -125,8 +126,9 @@ pub fn format_cost(cost: f64) -> String {
|
|||
mod tests {
|
||||
use fabro_llm::lithos_catalog::Catalog;
|
||||
use fabro_llm::test_support::{test_catalog, test_catalog_with_overlay};
|
||||
use fabro_types::{ModelId, ModelRef, ProviderId, Speed, TokenCounts, UsdMicros};
|
||||
use lithos_llm::catalog::builtin;
|
||||
use fabro_types::{ModelRef, UsdMicros};
|
||||
use lithos_llm::catalog::{ModelId, ProviderId, builtin};
|
||||
use lithos_llm::types::{Speed, TokenCounts};
|
||||
|
||||
use super::{OutcomeExt, billed_model_usage_from_llm};
|
||||
|
||||
|
|
|
|||
|
|
@ -8,9 +8,11 @@ use fabro_llm::credentials::CredentialProvider;
|
|||
use fabro_llm::lithos_catalog::Catalog;
|
||||
use fabro_llm::{Client, ClientOptions, Request, selection};
|
||||
use fabro_store::RunProjection;
|
||||
use fabro_types::PullRequestLink;
|
||||
use fabro_types::settings::run::MergeStrategy;
|
||||
use fabro_types::{ProviderId, PullRequestLink, Role};
|
||||
use fabro_util::text::strip_goal_decoration;
|
||||
use lithos_llm::catalog::ProviderId;
|
||||
use lithos_llm::types::{Message, Role};
|
||||
use tokio::time::sleep;
|
||||
use tracing::{debug, info, warn};
|
||||
|
||||
|
|
@ -405,7 +407,7 @@ async fn build_pr_content_with_client(
|
|||
let request = Request::builder()
|
||||
.model(model)
|
||||
.system(PR_BODY_SYSTEM_PROMPT)
|
||||
.message(fabro_types::Message::text(Role::User, prompt))
|
||||
.message(Message::text(Role::User, prompt))
|
||||
.build()
|
||||
.map_err(|e| format!("invalid PR content request: {e}"))?;
|
||||
let completion = client
|
||||
|
|
@ -694,12 +696,13 @@ mod tests {
|
|||
use fabro_llm::{Response, ResponseStream};
|
||||
use fabro_store::Database;
|
||||
use fabro_types::{
|
||||
BilledTokenCounts, ContentPart, RunProjection, RunSpec, SuccessReason, TokenCounts,
|
||||
WorkflowSettings, first_event_seq, fixtures, test_support,
|
||||
BilledTokenCounts, RunProjection, RunSpec, SuccessReason, WorkflowSettings,
|
||||
first_event_seq, fixtures, test_support,
|
||||
};
|
||||
use fabro_vault::{SecretType, Vault};
|
||||
use httpmock::Method::{GET, POST};
|
||||
use httpmock::MockServer;
|
||||
use lithos_llm::types::{ContentPart, TokenCounts};
|
||||
use object_store::memory::InMemory;
|
||||
use tokio::sync::RwLock as AsyncRwLock;
|
||||
|
||||
|
|
@ -802,7 +805,7 @@ capabilities = { text = true, tools = true, response_format = { json_object = tr
|
|||
let mut options = fabro_llm::ClientOptions::default();
|
||||
options
|
||||
.adapters
|
||||
.push((fabro_types::ProviderId::new(provider_name), adapter));
|
||||
.push((ProviderId::new(provider_name), adapter));
|
||||
Arc::new(
|
||||
fabro_llm::build_offline_client(mock_catalog(), options)
|
||||
.expect("mock client should build")
|
||||
|
|
|
|||
|
|
@ -11,9 +11,10 @@ use fabro_template::TemplateContext;
|
|||
use fabro_types::settings::run::{
|
||||
PullRequestSettings, ResolvedGithubIntegration, RunModelControls,
|
||||
};
|
||||
use fabro_types::{ManifestPath, ProviderId, RunId, RunProjection};
|
||||
use fabro_types::{ManifestPath, RunId, RunProjection};
|
||||
use fabro_validate::{Diagnostic, Severity};
|
||||
use fabro_vault::Vault;
|
||||
use lithos_llm::catalog::ProviderId;
|
||||
use tokio::sync::RwLock as AsyncRwLock;
|
||||
|
||||
use crate::artifact_upload::ArtifactSink;
|
||||
|
|
|
|||
|
|
@ -3,9 +3,10 @@ use std::collections::HashSet;
|
|||
use fabro_graphviz::graph::Graph;
|
||||
use fabro_llm::lithos_catalog::Catalog;
|
||||
use fabro_llm::{ModelSelectionError, selection};
|
||||
use fabro_types::WorkflowSettings;
|
||||
use fabro_types::settings::InterpString;
|
||||
use fabro_types::settings::run::RunGoal;
|
||||
use fabro_types::{ProviderId, WorkflowSettings};
|
||||
use lithos_llm::catalog::ProviderId;
|
||||
|
||||
use crate::error::Error;
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,8 @@ use fabro_hooks::{HookContext, HookDecision, HookExecutionContext, HookRunner};
|
|||
use fabro_interview::Interviewer;
|
||||
use fabro_llm::credentials::CredentialProvider;
|
||||
use fabro_llm::lithos_catalog::Catalog;
|
||||
use fabro_types::{ManifestPath, ProviderId, RunId};
|
||||
use fabro_types::{ManifestPath, RunId};
|
||||
use lithos_llm::catalog::ProviderId;
|
||||
use tokio_util::sync::CancellationToken;
|
||||
|
||||
use crate::event::Emitter;
|
||||
|
|
|
|||
|
|
@ -12,10 +12,11 @@ use fabro_llm::credentials::CredentialProvider;
|
|||
use fabro_llm::lithos_catalog::Catalog;
|
||||
use fabro_llm::test_support::test_catalog;
|
||||
use fabro_store::{ArtifactStore, RunProjection, test_support as store_test_support};
|
||||
use fabro_types::ModelRef;
|
||||
#[cfg(feature = "test-support")]
|
||||
use fabro_types::ProviderId;
|
||||
use fabro_types::{ModelId, ModelRef};
|
||||
use lithos_llm::catalog::builtin;
|
||||
use lithos_llm::catalog::ProviderId;
|
||||
use lithos_llm::catalog::{ModelId, builtin};
|
||||
use lithos_llm::types::TokenCounts;
|
||||
use object_store::local::LocalFileSystem;
|
||||
|
||||
use crate::artifact_upload::ArtifactSink;
|
||||
|
|
@ -91,10 +92,10 @@ pub fn test_usage(
|
|||
) -> fabro_types::BilledModelUsage {
|
||||
let mut usage = fabro_types::BilledModelUsage::new(
|
||||
ModelRef::new(builtin::openai(), ModelId::new(model_id)),
|
||||
fabro_types::TokenCounts {
|
||||
TokenCounts {
|
||||
input: input_tokens,
|
||||
output: output_tokens,
|
||||
..fabro_types::TokenCounts::default()
|
||||
..TokenCounts::default()
|
||||
},
|
||||
None,
|
||||
);
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ use std::sync::Arc;
|
|||
use fabro_graphviz::graph::{AttrValue, Graph};
|
||||
use fabro_llm::lithos_catalog::Catalog;
|
||||
use fabro_llm::selection;
|
||||
use fabro_types::ProviderId;
|
||||
use lithos_llm::catalog::ProviderId;
|
||||
|
||||
use super::Transform;
|
||||
use crate::error::Error;
|
||||
|
|
|
|||
|
|
@ -32,9 +32,7 @@ use fabro_interview::{
|
|||
};
|
||||
use fabro_llm::lithos_catalog::Catalog;
|
||||
use fabro_store::{ArtifactKey, ArtifactStore};
|
||||
use fabro_types::{
|
||||
EventBody, ProviderId, RunEvent, RunId, StageId, WorkflowSettings, parse_blob_ref,
|
||||
};
|
||||
use fabro_types::{EventBody, RunEvent, RunId, StageId, WorkflowSettings, parse_blob_ref};
|
||||
use fabro_validate::{Severity, validate, validate_or_raise};
|
||||
use fabro_workflow::artifact;
|
||||
use fabro_workflow::context::Context;
|
||||
|
|
@ -62,6 +60,7 @@ use fabro_workflow::test_support::{
|
|||
};
|
||||
use fabro_workflow::transforms::stylesheet::{apply_stylesheet, parse_stylesheet};
|
||||
use fabro_workflow::transforms::{StylesheetApplicationTransform, TemplateTransform, Transform};
|
||||
use lithos_llm::catalog::ProviderId;
|
||||
use object_store::local::LocalFileSystem;
|
||||
use tokio_util::sync::CancellationToken;
|
||||
use ulid::Ulid;
|
||||
|
|
|
|||
|
|
@ -504,19 +504,19 @@ fn main() {
|
|||
"fabro_types::PendingInterviewRecord",
|
||||
&[],
|
||||
),
|
||||
("CompletionUsage", "fabro_types::TokenCounts", &[]),
|
||||
("CompletionUsage", "lithos_llm::types::TokenCounts", &[]),
|
||||
("BilledTokenCounts", "fabro_types::BilledTokenCounts", &[]),
|
||||
("BillingModelRef", "fabro_types::ModelRef", &[]),
|
||||
("BillingSpeed", "fabro_types::Speed", &[]),
|
||||
("BillingSpeed", "lithos_llm::types::Speed", &[]),
|
||||
("ExecOutputTail", "fabro_types::ExecOutputTail", &[]),
|
||||
("StageTiming", "fabro_types::StageTiming", &[]),
|
||||
("RunTiming", "fabro_types::RunTiming", &[]),
|
||||
("ProviderId", "fabro_types::ProviderId", &[]),
|
||||
("ModelHandle", "fabro_types::ModelHandle", &[]),
|
||||
("ProviderId", "lithos_llm::catalog::ProviderId", &[]),
|
||||
("ModelHandle", "lithos_llm::catalog::ModelHandle", &[]),
|
||||
("Model", "fabro_types::Model", &[]),
|
||||
("Provider", "fabro_types::Provider", &[]),
|
||||
("ModelLimits", "fabro_types::ModelLimits", &[]),
|
||||
("ReasoningEffort", "fabro_types::ReasoningEffort", &[]),
|
||||
("ReasoningEffort", "lithos_llm::types::ReasoningEffort", &[]),
|
||||
("ModelFeatures", "fabro_types::ModelFeatures", &[]),
|
||||
("ModelControls", "fabro_types::ModelControls", &[]),
|
||||
("ModelCosts", "fabro_types::ModelCosts", &[]),
|
||||
|
|
@ -730,27 +730,31 @@ fn main() {
|
|||
("SessionRecord", "fabro_types::SessionRecord", &[]),
|
||||
("SessionSummary", "fabro_types::SessionSummary", &[]),
|
||||
("SessionDetail", "fabro_types::SessionDetail", &[]),
|
||||
("ReasoningOutput", "fabro_types::ReasoningOutput", &[]),
|
||||
("CompletionMessage", "fabro_types::Message", &[]),
|
||||
("CompletionMessageRole", "fabro_types::Role", &[]),
|
||||
("CompletionContentPart", "fabro_types::ContentPart", &[]),
|
||||
("ReasoningOutput", "lithos_llm::types::ReasoningOutput", &[]),
|
||||
("CompletionMessage", "lithos_llm::types::Message", &[]),
|
||||
("CompletionMessageRole", "lithos_llm::types::Role", &[]),
|
||||
(
|
||||
"CompletionContentPart",
|
||||
"lithos_llm::types::ContentPart",
|
||||
&[],
|
||||
),
|
||||
(
|
||||
"CompletionToolDefinition",
|
||||
"fabro_types::ToolDefinition",
|
||||
"lithos_llm::types::ToolDefinition",
|
||||
&[],
|
||||
),
|
||||
(
|
||||
"CompletionToolDefinitionKind",
|
||||
"fabro_types::ToolDefinitionKind",
|
||||
"lithos_llm::types::ToolDefinitionKind",
|
||||
&[],
|
||||
),
|
||||
("CompletionToolChoice", "fabro_types::ToolChoice", &[]),
|
||||
("CompletionToolChoice", "lithos_llm::types::ToolChoice", &[]),
|
||||
(
|
||||
"CompletionResponseFormat",
|
||||
"fabro_types::ResponseFormat",
|
||||
"lithos_llm::types::ResponseFormat",
|
||||
&[],
|
||||
),
|
||||
("CompletionCost", "fabro_types::Cost", &[]),
|
||||
("CompletionCost", "lithos_llm::types::Cost", &[]),
|
||||
("WorkflowVersion", "fabro_types::WorkflowVersion", &[]),
|
||||
("RunIntent", "fabro_types::RunIntent", &[]),
|
||||
("RunIntentArgs", "fabro_types::RunIntentArgs", &[]),
|
||||
|
|
@ -759,7 +763,7 @@ fn main() {
|
|||
("WorkflowPath", "fabro_types::WorkflowPath", &[]),
|
||||
("WorkflowVersionId", "fabro_types::WorkflowVersionId", &[]),
|
||||
("BlobHash", "fabro_types::BlobHash", &[]),
|
||||
("CostSource", "fabro_types::CostSource", &[]),
|
||||
("CostSource", "lithos_llm::types::CostSource", &[]),
|
||||
];
|
||||
for (name, path, impls) in replacements {
|
||||
settings.with_replacement(*name, *path, impls.iter().copied());
|
||||
|
|
|
|||
|
|
@ -41,45 +41,47 @@ pub mod types {
|
|||
ActivatedSkill, AgentControlState, AgentMcpToolSummary, AgentSkillActivationSource,
|
||||
AgentSkillSummary, AgentToolCategory, AgentToolSource, AgentToolSummary,
|
||||
AgentToolsAvailableProps, AskFabro, AuthMethod, AutomationRef, BilledTokenCounts, BlobHash,
|
||||
CommandTermination, Conclusion, ContentPart, Cost as CompletionCost, CostSource,
|
||||
CreateVariableRequest, DiffStats, DiffSummary, DirtyStatus, EventEnvelope, ExecOutputTail,
|
||||
FailureCategory, FailureDetail, FailureSignature, GitContext, GitRunTarget,
|
||||
GitRunTarget as AutomationGitWorkflowSource, IdpIdentity, IntegrationConnectionKind,
|
||||
IntegrationConnectionState, IntegrationConnectionStatus, IntegrationProvider,
|
||||
IntegrationStatus, InterviewOption, InterviewQuestionRecord, LlmOutputKind,
|
||||
McpServerDraft as CreateMcpServerRequest, McpServerProjection,
|
||||
CommandTermination, Conclusion, CreateVariableRequest, DiffStats, DiffSummary, DirtyStatus,
|
||||
EventEnvelope, ExecOutputTail, FailureCategory, FailureDetail, FailureSignature,
|
||||
GitContext, GitRunTarget, GitRunTarget as AutomationGitWorkflowSource, IdpIdentity,
|
||||
IntegrationConnectionKind, IntegrationConnectionState, IntegrationConnectionStatus,
|
||||
IntegrationProvider, IntegrationStatus, InterviewOption, InterviewQuestionRecord,
|
||||
LlmOutputKind, McpServerDraft as CreateMcpServerRequest, McpServerProjection,
|
||||
McpServerReplace as ReplaceMcpServerRequest, McpServerStatus, McpServerView as McpServer,
|
||||
McpTransportView, Message, Model, ModelControls, ModelCosts, ModelFeatures, ModelHandle,
|
||||
ModelLimits, ModelRef as BillingModelRef, ModelTestMode, PairId, PairMessageId,
|
||||
PairMessageRecord, PairMessageRequest, PairRecord, PairStartRequest, PairStatus,
|
||||
PairTarget, PairTranscriptEntry, PairTranscriptResponse, ParallelBranchId,
|
||||
ParallelBranchResult, PendingInterviewRecord, PermissionLevel, Principal, Provider,
|
||||
ProviderId, PullRequest, PullRequestCreation, PullRequestCreationId,
|
||||
PullRequestCreationStatus, PullRequestDetails, PullRequestDetailsStatus,
|
||||
PullRequestDetailsUnavailableReason, PullRequestLink, PullRequestMeta, PullRequestResponse,
|
||||
QuestionType, ReasoningEffort, ReasoningOutput, RepositoryRef,
|
||||
ResponseFormat as CompletionResponseFormat, ReviewTarget, ReviewTargetKind, Role, Run,
|
||||
RunApproval, RunApprovalState, RunClientProvenance, RunEvent, RunEventDetailContentKind,
|
||||
RunEventDetailResponse, RunFailure, RunIntent, RunIntentArgs, RunPairStatusResponse,
|
||||
RunProjection, RunProvenance, RunRunnableSource, RunSandbox, RunSandboxFailure,
|
||||
RunSandboxInstance, RunSandboxKind, RunSandboxPlan, RunSandboxRuntime, RunServerProvenance,
|
||||
RunSize, RunTarget, SandboxDetails, SandboxInfo, SandboxListMeta, SandboxListResponse,
|
||||
SandboxNetwork, SandboxNetworkPolicy, SandboxNetworkPolicyMode, SandboxProviderKind,
|
||||
SandboxProviderLookupError, SandboxResources, SandboxService, SandboxServiceListResponse,
|
||||
SandboxState, SandboxTimestamps, SecretMetadata, SecretType, ServerSettings, SessionDetail,
|
||||
SessionId, SessionMessage, SessionRecord, SessionStatus, SessionSummary, SessionTurn,
|
||||
SkillsProjection, Speed as BillingSpeed, StageCompletion, StageContextWindow,
|
||||
McpTransportView, Model, ModelControls, ModelCosts, ModelFeatures, ModelLimits,
|
||||
ModelRef as BillingModelRef, ModelTestMode, PairId, PairMessageId, PairMessageRecord,
|
||||
PairMessageRequest, PairRecord, PairStartRequest, PairStatus, PairTarget,
|
||||
PairTranscriptEntry, PairTranscriptResponse, ParallelBranchId, ParallelBranchResult,
|
||||
PendingInterviewRecord, PermissionLevel, Principal, Provider, PullRequest,
|
||||
PullRequestCreation, PullRequestCreationId, PullRequestCreationStatus, PullRequestDetails,
|
||||
PullRequestDetailsStatus, PullRequestDetailsUnavailableReason, PullRequestLink,
|
||||
PullRequestMeta, PullRequestResponse, QuestionType, RepositoryRef, ReviewTarget,
|
||||
ReviewTargetKind, Run, RunApproval, RunApprovalState, RunClientProvenance, RunEvent,
|
||||
RunEventDetailContentKind, RunEventDetailResponse, RunFailure, RunIntent, RunIntentArgs,
|
||||
RunPairStatusResponse, RunProjection, RunProvenance, RunRunnableSource, RunSandbox,
|
||||
RunSandboxFailure, RunSandboxInstance, RunSandboxKind, RunSandboxPlan, RunSandboxRuntime,
|
||||
RunServerProvenance, RunSize, RunTarget, SandboxDetails, SandboxInfo, SandboxListMeta,
|
||||
SandboxListResponse, SandboxNetwork, SandboxNetworkPolicy, SandboxNetworkPolicyMode,
|
||||
SandboxProviderKind, SandboxProviderLookupError, SandboxResources, SandboxService,
|
||||
SandboxServiceListResponse, SandboxState, SandboxTimestamps, SecretMetadata, SecretType,
|
||||
ServerSettings, SessionDetail, SessionId, SessionMessage, SessionRecord, SessionStatus,
|
||||
SessionSummary, SessionTurn, SkillsProjection, StageCompletion, StageContextWindow,
|
||||
StageContextWindowBreakdownItem, StageContextWindowCategory, StageContextWindowCountMethod,
|
||||
StageContextWindowProjection, StageContextWindowStaleness,
|
||||
StageContextWindowUnavailableReason, StageContextWindowWarning, StageHandler, StageId,
|
||||
StageInferenceProjection, StageModelUsage, StageOutcome, StageProjection, StageState,
|
||||
StageToolBatchProjection, SubAgentProjection, SubAgentStatus, SystemActorKind,
|
||||
SystemIntegrationStatus, SystemIntegrationsResponse, TodoListProjection,
|
||||
SystemIntegrationStatus, SystemIntegrationsResponse, TodoListProjection, TurnId,
|
||||
UpdateVariableRequest, UserPrincipal, Variable, VariableListResponse, WorkflowPath,
|
||||
WorkflowSettings, WorkflowVersion, WorkflowVersionId,
|
||||
};
|
||||
pub use lithos_llm::catalog::{ModelHandle, ProviderId};
|
||||
pub use lithos_llm::types::{
|
||||
ContentPart, Cost as CompletionCost, CostSource, Message, ReasoningEffort, ReasoningOutput,
|
||||
ResponseFormat as CompletionResponseFormat, Role, Speed as BillingSpeed,
|
||||
TokenCounts as CompletionUsage, ToolChoice as CompletionToolChoice,
|
||||
ToolDefinition as CompletionToolDefinition,
|
||||
ToolDefinitionKind as CompletionToolDefinitionKind, TurnId, UpdateVariableRequest,
|
||||
UserPrincipal, Variable, VariableListResponse, WorkflowPath, WorkflowSettings,
|
||||
WorkflowVersion, WorkflowVersionId,
|
||||
ToolDefinitionKind as CompletionToolDefinitionKind,
|
||||
};
|
||||
|
||||
pub use crate::generated::types::*;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@ use std::any::{TypeId, type_name};
|
|||
|
||||
use fabro_api::types::AgentSessionActivatedProps as ApiAgentSessionActivatedProps;
|
||||
use fabro_types::run_event::AgentSessionActivatedProps;
|
||||
use fabro_types::{PermissionLevel, ReasoningEffort, SessionCapability, Speed};
|
||||
use fabro_types::{PermissionLevel, SessionCapability};
|
||||
use lithos_llm::types::{ReasoningEffort, Speed};
|
||||
use serde_json::json;
|
||||
|
||||
#[test]
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
use std::any::{TypeId, type_name};
|
||||
|
||||
use fabro_api::types::{ContentPart as ApiContentPart, Message as ApiMessage, Role as ApiRole};
|
||||
use fabro_types::{ContentPart, Message, Role, ToolCall, ToolResult};
|
||||
use lithos_llm::types::{ContentPart, Message, Role, ToolCall, ToolResult};
|
||||
use serde_json::json;
|
||||
|
||||
#[test]
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
use std::any::{TypeId, type_name};
|
||||
|
||||
use fabro_api::types::CompletionUsage as ApiCompletionUsage;
|
||||
use fabro_types::TokenCounts;
|
||||
use lithos_llm::types::TokenCounts;
|
||||
use serde_json::json;
|
||||
|
||||
#[test]
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
use std::any::{TypeId, type_name};
|
||||
|
||||
use fabro_api::types::{CompletionCost as ApiCost, CostSource as ApiCostSource};
|
||||
use fabro_types::{Cost, CostSource};
|
||||
use lithos_llm::types::{Cost, CostSource};
|
||||
use serde_json::json;
|
||||
|
||||
#[test]
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
use fabro_api::types::CreateCompletionRequest;
|
||||
use fabro_types::{ReasoningEffort, ResponseFormat, Speed, ToolChoice, ToolDefinitionKind};
|
||||
use lithos_llm::types::{ReasoningEffort, ResponseFormat, Speed, ToolChoice, ToolDefinitionKind};
|
||||
use serde_json::json;
|
||||
|
||||
#[test]
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
use std::any::{TypeId, type_name};
|
||||
|
||||
use fabro_api::types::{Model as ApiModel, ModelControls as ApiModelControls};
|
||||
use fabro_types::{Model, ModelControls, ModelCosts, ModelFeatures, ModelLimits, ReasoningEffort};
|
||||
use fabro_types::{Model, ModelControls, ModelCosts, ModelFeatures, ModelLimits};
|
||||
use lithos_llm::catalog::builtin;
|
||||
use lithos_llm::types::ReasoningEffort;
|
||||
|
||||
#[test]
|
||||
fn model_reuses_canonical_type() {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
use std::any::{TypeId, type_name};
|
||||
|
||||
use fabro_api::types::{ModelHandle as ApiModelHandle, ProviderId as ApiProviderId};
|
||||
use fabro_types::{ModelHandle, ModelId, ProviderId};
|
||||
use lithos_llm::catalog::builtin;
|
||||
use lithos_llm::catalog::{ModelHandle, ModelId, ProviderId, builtin};
|
||||
use serde_json::json;
|
||||
|
||||
#[test]
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
use std::any::{TypeId, type_name};
|
||||
|
||||
use fabro_api::types::Provider as ApiProvider;
|
||||
use fabro_types::{Provider, ProviderId};
|
||||
use lithos_llm::catalog::builtin;
|
||||
use fabro_types::Provider;
|
||||
use lithos_llm::catalog::{ProviderId, builtin};
|
||||
|
||||
#[test]
|
||||
fn provider_reuses_canonical_type() {
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue