Harden Harness runtime, persistence and execution for Hand

This commit is contained in:
sausheong committed 2026-09-09 22:55:55 +08:00
1 parent 09c30fe2d5
commit 0972eed3ea
164 files changed
+15912 -506

No files matched your search

+12
View File
@@ -152,7 +152,17 @@ func ParseReasoningMode(s string) (ReasoningMode, error) {
}
// ChatRequest is the input to a streaming chat call.
// CallRoute identifies the constructed provider client for local admission and
// accounting. It is not sent to the provider. Destination must distinguish
// custom endpoints from explicitly named provider defaults.
type CallRoute struct {
Provider string `json:"provider"`
Destination string `json:"destination"`
}
type ChatRequest struct {
Route CallRoute `json:"-"`
Model string
Messages []Message
Tools []ToolDef
@@ -181,6 +191,8 @@ type ChatRequest struct {
}
// Usage tracks token usage.
// InputTokens is total input including cached input. Cache counters are
// subsets used for pricing/analysis and must not be added again for context.
type Usage struct {
InputTokens int `json:"input_tokens"`
OutputTokens int `json:"output_tokens"`