This commit is contained in:
lpf
2026-02-18 23:13:17 +08:00
parent ddca0605c4
commit d47b6428c8
9 changed files with 231 additions and 37 deletions

View File

@@ -40,6 +40,13 @@ type LLMProvider interface {
GetDefaultModel() string
}
// ResponsesCompactor is an optional capability interface.
// Providers that support OpenAI /v1/responses/compact can implement this.
type ResponsesCompactor interface {
SupportsResponsesCompact() bool
BuildSummaryViaResponsesCompact(ctx context.Context, model string, existingSummary string, messages []Message, maxSummaryChars int) (string, error)
}
type ToolDefinition struct {
Type string `json:"type"`
Function ToolFunctionDefinition `json:"function"`