v0.3.1 -> v0.4.0
Summary
Provider calls gain an explicit execution mode, allowing supported backends to request faster service tiers.
翻譯
供應商呼叫新增明確的執行模式,讓支援的後端可以要求更快速的服務層級。
⚠️ Breaking Changes
Provider send interfaces require an execution mode
The public Agent.Send and StreamAgent.SendStream interfaces now require an additional mode core.Mode argument. Existing callers and custom provider implementations must be updated to pass an execution mode.
Before:
output, code, err := agent.Send(ctx, messages, tools, reasoning)
events, err := agent.SendStream(ctx, messages, tools, reasoning)
After:
output, code, err := agent.Send(ctx, messages, tools, reasoning, core.ModeDefault)
events, err := agent.SendStream(ctx, messages, tools, reasoning, core.ModeDefault)
Use core.ModeFast only when fast execution is desired and supported by the selected model; otherwise use core.ModeDefault. Custom implementations of either public interface must add the new parameter to their method signatures.
翻譯
公開的 Agent.Send 與 StreamAgent.SendStream 介面現在都需要額外的 mode core.Mode 參數。既有呼叫端與自訂供應商實作必須傳入執行模式;一般情況使用 core.ModeDefault,需要快速執行時才使用 core.ModeFast,並確認所選模型支援該模式。
Changes
BREAKING
- Add an execution mode parameter to provider send interfaces and propagate fast-mode handling across supported providers (@pardnchiu) [a455a88]
翻譯
- 為供應商傳送介面新增執行模式參數,並在支援的供應商間傳遞 fast mode (@pardnchiu) [a455a88]
DOC
- Expand bilingual API and architecture documentation for modes, streaming, provider routing, tool calling, OAuth, and the test service (@pardnchiu) [72625bc]
翻譯
- 擴充雙語 API 與架構文件,補充模式、串流、供應商路由、工具呼叫、OAuth 與測試服務 (@pardnchiu) [72625bc]
Scope
core/— BREAKING (mode.go,type.go)core/claude/— BREAKING (send.go,stream.go,type.go)core/cloudflare/,core/compat/,core/deepseek/,core/gemini/,core/nvidia/— BREAKING (send.go)core/copilot/— BREAKING (response/responses.go,send.go,stream.go)core/grok/,core/grokOauth/— BREAKING (send.go)core/openai/,core/openaiCodex/— BREAKING (send.go)core/openRouter/— BREAKING (send.go)doc/— DOC (architecture.md,architecture.zh.md,doc.md,doc.zh.md)
Generated by SKILL