llm: switch Skald to agent-loop Model clients; drop llm-client (phase 1, D13)
The LLM call path now runs on the agent-loop crate's clients and trait: - core-api: BuiltLlmClient.client is Arc<dyn agent_loop::model::Model>; chatbot.rs (ChatbotClient + wire types) deleted; APP_NAME re-exported from agent-loop - providers (openai/anthropic/ollama/openrouter/requesty/declared) build OpenAiModel/AnthropicModel/OllamaModel with the model's wire id - LoggingModel decorator (llm/logging.rs) replaces LoggingChatbotClient; per-request correlation (session/stack/user) travels in the new ModelRequest.log field, never sent to providers - llm_call/llm_loop/compactor speak Model::complete + ModelResponse; retriability via Model::is_retriable (structured status, B6 rule now the crate's default); payload persistence reads RawMeta off ModelResponse/ModelError - crates/llm-client and skald-core/src/chatbot deleted Full workspace test suite green (incl. 162 skald-core + 32 agent-loop).
This commit is contained in:
@@ -156,6 +156,7 @@ pub(crate) async fn run(
|
||||
conversation: params.conversation.clone(),
|
||||
frame,
|
||||
extras: handle.info.extras.clone(),
|
||||
log: None,
|
||||
};
|
||||
let result = tokio::select! {
|
||||
biased;
|
||||
|
||||
@@ -198,8 +198,12 @@ pub struct ModelRequest {
|
||||
pub conversation: ConversationId,
|
||||
pub frame: FrameId,
|
||||
/// Host free-form per-request extras (e.g. reasoning knobs resolved for
|
||||
/// this model). Merged last by the shipped clients.
|
||||
/// this model). Merged last by the shipped clients INTO THE REQUEST BODY.
|
||||
pub extras: Value,
|
||||
/// Host logging/telemetry correlation (session ids, user id, …).
|
||||
/// **Never** merged into the request body by the shipped clients — it
|
||||
/// exists for host decorators (e.g. a `LoggingModel`) only.
|
||||
pub log: Option<Value>,
|
||||
}
|
||||
|
||||
// ── Model ────────────────────────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user