Part of epic #3602 .
Scope
Complete the LlmProvider impl on GonkaProvider by adding chat_with_tools and chat_typed::<T> plus last_usage / last_cache_usage accounting.
Files to modify
crates/zeph-llm/src/gonka/mod.rs — extend LlmProvider impl:
chat_with_tools(messages, tools) — reuse OpenAI tool-body builder + decode_tool_chat_response (extract to openai/wire.rs if not already done in feat(zeph-llm): GonkaProvider chat / chat_stream / embed (signed transport) #3611 ).
chat_typed::<T>(messages) — reuse TypedChatRequest body helper from openai.
supports_tool_use returns true; supports_structured_output returns true.
last_usage / last_cache_usage route decoded OpenAiUsage through inner.store_cache_usage(usage) — promote that helper to pub(crate) in openai/mod.rs.
crates/zeph-llm/src/openai/mod.rs — promote helpers to pub(crate): store_cache_usage, decode_tool_chat_response (or move both to openai/wire.rs).
crates/zeph-llm/src/gonka/tests.rs — wiremock tests:
Tool-call round-trip: provider receives a tool-use response, returns ChatResponse::ToolUse with correct call IDs and arguments.
Structured output: chat_typed::<MyStruct>(...) returns a parsed value.
Acceptance
cargo nextest run -p zeph-llm -E 'test(gonka_tools)' green.
All previously written gonka tests still pass.
cargo clippy --workspace --features full -- -D warnings green.
cargo doc --no-deps -p zeph-llm clean with broken-intra-doc-links denied.
CHANGELOG.md [Unreleased] updated.
Depends on
#3611 .
Size
M (~4h)
Part of epic #3602.
Scope
Complete the
LlmProviderimpl onGonkaProviderby addingchat_with_toolsandchat_typed::<T>pluslast_usage/last_cache_usageaccounting.Files to modify
crates/zeph-llm/src/gonka/mod.rs— extendLlmProviderimpl:chat_with_tools(messages, tools)— reuse OpenAI tool-body builder +decode_tool_chat_response(extract toopenai/wire.rsif not already done in feat(zeph-llm): GonkaProvider chat / chat_stream / embed (signed transport) #3611).chat_typed::<T>(messages)— reuseTypedChatRequestbody helper from openai.supports_tool_usereturnstrue;supports_structured_outputreturnstrue.last_usage/last_cache_usageroute decodedOpenAiUsagethroughinner.store_cache_usage(usage)— promote that helper topub(crate)inopenai/mod.rs.crates/zeph-llm/src/openai/mod.rs— promote helpers topub(crate):store_cache_usage,decode_tool_chat_response(or move both toopenai/wire.rs).crates/zeph-llm/src/gonka/tests.rs— wiremock tests:ChatResponse::ToolUsewith correct call IDs and arguments.chat_typed::<MyStruct>(...)returns a parsed value.Acceptance
cargo nextest run -p zeph-llm -E 'test(gonka_tools)'green.cargo clippy --workspace --features full -- -D warningsgreen.cargo doc --no-deps -p zeph-llmclean with broken-intra-doc-links denied.CHANGELOG.md[Unreleased]updated.Depends on
#3611.
Size
M (~4h)