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:
2026-07-25 23:55:17 +01:00
parent b8cc6d263b
commit 882a8c9cb9
29 changed files with 251 additions and 2128 deletions
Generated
+2 -17
View File
@@ -599,6 +599,7 @@ checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8"
name = "core-api"
version = "0.1.0"
dependencies = [
"agent-loop",
"anyhow",
"async-trait",
"axum",
@@ -2198,21 +2199,6 @@ version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0"
[[package]]
name = "llm-client"
version = "0.1.0"
dependencies = [
"anyhow",
"async-trait",
"core-api",
"futures-util",
"reqwest 0.13.4",
"serde",
"serde_json",
"tokio",
"tracing",
]
[[package]]
name = "lock_api"
version = "0.4.14"
@@ -4198,7 +4184,6 @@ dependencies = [
"futures",
"honcho-client",
"indexmap 2.14.0",
"llm-client",
"mcp-client",
"notify",
"plugin-comfyui",
@@ -4232,6 +4217,7 @@ name = "skald-core"
version = "0.1.0"
dependencies = [
"aes-gcm",
"agent-loop",
"anyhow",
"argon2",
"async-trait",
@@ -4248,7 +4234,6 @@ dependencies = [
"indexmap 2.14.0",
"libc",
"libsqlite3-sys",
"llm-client",
"mcp-client",
"notify",
"os_info",