Documentation
¶
Overview ¶
Package chat is the ONE canonical chat orchestrator for Hanzo Cloud: POST /v1/chat runs a single LLM tool-calling round that lets a model manage a system through tools. It COMPOSES existing cloud pieces rather than reinventing them —
- LLM routing + per-org reserve/settle billing: the ai subsystem's /v1/chat/completions, invoked in-process (the ONLY path that both returns tool_calls and carries the billing gate);
- the unified tool plane (clients/tools): the org's registered MCP/registry tools are offered to the model and dispatched server-side through the ONE per-principal plane (activation + price gates included);
- capabilities (capability.go): the system prompt + builtin tool defs that frame a round for a use case (graph editing, product/fashion render).
A round yields three things: the assistant's text (reply), the tool calls the server executed against the registry (actions), and the tool calls the client must apply itself — a graph/UI mutation the server cannot run (ops).
Route ownership: chat OWNS /v1/chat. The ai module also registers a beego /v1/chat alias behind its /v1/* catch-all, but chat mounts BEFORE ai in Wire, so Fiber's first-match resolves /v1/chat here and the alias is shadowed (never reached). ai keeps /v1/chat/completions and /v1/completions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.