Repository navigation
Releases
v0.9.0
🚨 Breaking Changes
🚀 Features
🐞 Bug Fixes
- completions: Json_schema 结构化输出按 Chat Completions 规范包装 - by @sheepbox8646 and Claude Opus 5.5 in #124 (df74a)
View changes on GitHub
v0.8.1
Bug Fixes
- Completions: preserve streamed
reasoning_detailswire order and opaque encrypted entries (#118). - Google: use the correct embedding batch limit and fully paginate generative and embedding model discovery (#120).
Notes
v0.8.0
🚨 Breaking Changes
- anthropic: 思考配置支持 display、显式关闭与交错思考 beta 头 - by @sheepbox8646 and Claude Opus 5.5 in #115 (0d17b)
- completions: 推理回传字段可配置,sdk.Model 补充模型元数据 - by @sheepbox8646 and Claude Opus 5.5 in #116 (e47c5)
- sdk: 移除 ModelType,EmbeddingModel 补充元数据 - by @sheepbox8646 and Claude Opus 5.5 in #117 (2fb5a)
🚀 Features
- agentcore:
- run:
🐞 Bug Fixes
- anthropic: Include cached tokens in input usage - by @ChrAlpha in #55 (f6d0c)
- google: 修复推理档位映射与思考签名解析 - by @sheepbox8646 and Claude Opus 5.5 in #114 (4b93c)
View changes on GitHub
v0.7.1
🐞 Bug Fixes
View changes on GitHub
v0.7.0
Upgrading from v0.6.0
The module path is now github.com/felinics/twilight. v0.7.0 is the first tag under it, so replace the github.com/memohai/twilight imports and run go get github.com/felinics/twilight@v0.7.0.
The text-generation client layer is removed (#53). Model.Generate and Model.Stream take an sdk.Request and are the only chat entry points. GenerateText, StreamText, MaxSteps, tool execution and approval, and the MCP client are gone; the caller runs tools and loops. ToolArguments, ToolOutput and Request.ProviderOptions hold RFC 8785 canonical JSON (#54), and RawJSONOutput returns an error.
Provider failures are *sdk.APIError: non-2xx responses, error events inside a stream (StatusCode 0), and failed video jobs. Read the cause with sdk.KindOf(err), which returns one of authentication, permission_denied, quota_exhausted, rate_limited, server_error or unknown. The set is open, so a switch on it needs a default branch. Error() has no stable format and no longer starts with api error. Code that matches the error text, such as a regexp on api error 5\d\d to decide whether to retry, stops matching and must move to KindOf. RetryAfter() reads retry-after-ms and Retry-After.
A stream that ends before its terminal event emits an ErrorPart wrapping sdk.ErrStreamIncomplete, followed by a FinishPart with FinishReasonError. It used to end as a success.
Provider.Test returns error: nil when the provider is reachable and accepts the credentials. ProviderTestResult, ProviderStatus and ClassifyProbeStatus are removed. VideoProvider requires Name(), and VideoError has a Kind.
edge.EdgeTTSVoices is replaced by Voices(), which returns a copy.
sdk.WithClientRequestID(ctx, id) sends a caller-chosen request ID to the providers that accept one. Nothing is sent when it is not set.
- edge:
- provider:
- sdk:
🚀 Features
🐞 Bug Fixes
- anthropic:
- ci:
- completions:
- errorformat:
- headers:
- opencode-go:
- openrouter:
- provider:
- Replay invalid tool arguments as {} on string-typed wire fields - by @Fodesu in #58 (22d89)
- Bound the error body NewHTTPError reads; match Copilot test errors by field - by @HoneyBBQ (9969f)
- Leave 501 and 505 unclassified - by @HoneyBBQ (7bf57)
- Read ElevenLabs and MiniMax request IDs from the headers they send on errors - by @HoneyBBQ (d267e)
- sdk:
View changes on GitHub
v0.6.0
🚨 Breaking Changes
- Rename module to github.com/memohai/twilight - by @sheepbox8646 (b561c)
View changes on GitHub
v0.5.0
🚀 Features
- Add unified video generation providers - by @sheepbox8646 in #20 (a8230)
- Add Xiaomi MiMo speech providers - by @MasterYuan418 in #21 (4d62b)
- Add Alibaba Cloud DashScope image generation provider - by @akazwz in #25 (f7bcb)
- Support developer and fallback message roles - by @sheepbox8646 in #27 (c9803)
- Add step commit barrier - by @chen-ran in #30 (ceb51)
- anthropic:
- google:
- openai:
- provider:
- Translate FileParts into each provider's native file format - by @wishworldbetter in #31 (93241)
- speech:
🐞 Bug Fixes
- anthropic:
- google:
- openai:
- Handle usage delivered in trailing stream chunk - by @akazwz in #12 (43c38)
- Support DeepSeek thinking disable - by @akazwz in #13 (a9dad)
- Add Kimi chat completions compat for anyOf schema - by @chen-ran (84827)
- Preserve max effort for Codex - by @qqqqqf-q in #26 (c19f5)
- Rewrite Kimi MFJS schema normalization, require explicit compat opt-in - by @akazwz in #28 (198e8)
- Request reasoning summaries - by @alexma233 in #38 (63be1)
- Accept reasoning text delta events - by @alexma233 in #39 (ea90a)
- Capture encrypted_content on output_item.done, not added - by @HoneyBBQ (0b060)
- Handle Responses failed events - by @chen-ran (d852d)
- provider:
- reasoning:
- sdk:
🏎 Performance
View changes on GitHub
v0.4.0
🚀 Features
- Codex support - by @akichannnnn in #2 (a9628)
- Transcribe and tts model discovery - by @akichannnnn in #8 (8ac67)
- Support deferred tool approvals - by @sheepbox8646 (7fcc1)
- anthropic:
- copilot:
- openai:
- Parse image parts from chat completions responses - by @sheepbox8646 (497ad)
- Add image generation and editing provider - by @sheepbox8646 (a5067)
- openai-responses:
- Parse image_generation_call output - by @sheepbox8646 (00db3)
- sdk:
- Add SpeechProvider interface and Edge TTS provider - by @sheepbox8646 (df88d)
- speech:
🐞 Bug Fixes
- anthropic: Strip data URL prefix and validate media_type for image parts - by @sheepbox8646 (3ebcc)
- openrouter: Use uint32 types to eliminate gosec G115 nolint - by @HoneyBBQ (45261)
- speech: Resolve golangci-lint issues across providers - by @HoneyBBQ (e68a1)
- sse: Increase scanner buffer to handle large base64 payloads - by @sheepbox8646 (9e9f7)
- tests: Resolve SA5011 nil pointer dereference warnings - by @HoneyBBQ (2fb1a)
View changes on GitHub
v0.3.3
🐞 Bug Fixes
- sdk: Add fallback probe when GET /models/{id} returns 404 - by @sheepbox8646 (43c78)
View changes on GitHub
v0.3.2
🐞 Bug Fixes
- anthropic: Set default max_tokens when unset - by @ringotypowriter in #1 (1ada2)