refactor(server): adopt per-domain SDK clients (depends on aibroker#131) #128
No reviewers
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_books!128
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "development_sdk_127_per_domain"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Adopts the per-domain SDK shape introduced in hero_aibroker#131. Replaces hero_books_server's
AIBrokerAdminAPIClient::connect_default()calls (which would fail at runtime against the Phase-9 broker — the legacy unifiedrpc.sockis gone) with the new typed per-domain clients.What changed
mcp.rs)AIBrokerAdminAPIClient::connect_default()→client.ai_chat(AiChatInput {...})chat::Client::connect_default()→client.prompt(model).user(p).execute_content()GET /api/ai-summary(axum_server.rs)chat::ClientPOST /api/ai-summary(axum_server.rs)chat::ClientPOST /api/transcribe(axum_server.rs)client.ai_transcribe(...)→ same client for cleanup chatspeech::Clientfor transcribe + separatechat::Clientfor cleanupbroker_chat()is now a thin wrapper aroundclient.prompt(...).user(p).execute_content().await.Model alias
Default model reverts from
"llama-3.3-70b"(PR #125's naming) to"groq-strong"— the actual alias on the running broker'smodelsconfig.yml. The SDK'smodel_aliases::LLAMA_3_3_70B = "llama-3.3-70b"constant reflects an updated catalog naming that isn't yet on the running broker; switching to it requires the catalog update first.Dep pin (temporary)
hero_aibroker_sdkis pinned to branchdevelopment_sdk_127_per_domainuntil #131 merges to development. Once #131 lands, I'll push a follow-up commit here that switches the branch back to"development".Test plan
cargo build --workspace— clean🤖 Generated with Claude Code