Skip to content

Releases: pardnchiu/go-llm-router

v0.5.3

Choose a tag to compare

@pardnchiu pardnchiu released this 25 Aug 19:48
93c37a6

v0.5.2 -> v0.5.3

Summary

Expands the router with a unified image generation API across providers.

翻譯

統一各供應商的圖片生成 API。

Changes

FEAT

翻譯

Scope

  • core/image.go, core/*/image.go — FEAT

Generated by SKILL

v0.5.2

Choose a tag to compare

@pardnchiu pardnchiu released this 25 Aug 18:27
346550e

v0.5.1 -> v0.5.2

Summary

Expands provider coverage with Mistral support and strengthens provider-aware routing for compatible models.

翻譯

新增 Mistral 供應商支援,並強化相容模型的供應商識別與路由能力。

Changes

FEAT

翻譯

UPDATE

  • Prefix provider names in agent identifiers and support custom compat prefixes (@pardnchiu) [90f9f04]
翻譯
  • 在 Agent 識別名稱中加入供應商前綴並支援自訂 compat 前綴 (@pardnchiu) [90f9f04]

DOC

翻譯

Scope

  • core/mistral/ — FEAT, DOC (models.go, new.go, reasoning.go, send.go, stream.go)
  • core/compat/, core/router/, core/type.go — UPDATE
  • core/claude/, core/cloudflare/, core/gemini/, core/grok/, core/nvidia/, core/openai/ — UPDATE
  • README.md, doc/ — DOC

Generated by SKILL

v0.5.1

Choose a tag to compare

@pardnchiu pardnchiu released this 21 Aug 17:52
232a7b4

v0.5.0 -> v0.5.1

Summary

Expands the router with Mistral provider support and updates the provider documentation and counts.

翻譯

新增 Mistral 供應商支援,並更新供應商文件與數量統計。

Changes

FEAT

翻譯

DOC

翻譯

Scope

  • core/mistral/ — FEAT
  • core/router/router.go, core/type.go — FEAT
  • README.md, doc/ — DOC

Generated by SKILL

v0.5.0

Choose a tag to compare

@pardnchiu pardnchiu released this 11 Aug 14:10
6788e33

v0.4.1 -> v0.5.0

Summary

Unifies cross-provider token streaming behind a shared SSE layer and brings remaining backends online, including Gemini. Hardens stream error surfaces with typed failures and clearer upstream diagnostics.

翻譯

以共用 SSE 層統一跨供應商 token 串流,並補齊其餘後端(含 Gemini)。以型別化錯誤與更清楚的上游診斷強化串流失敗表面。

⚠️ Breaking Changes

core.OpenStream no longer returns HTTP status

Before:

func OpenStream(ctx context.Context, client *http.Client, url string, headers map[string]string, body map[string]any, label string) (*http.Response, int, error)

After:

func OpenStream(ctx context.Context, client *http.Client, url string, headers map[string]string, body map[string]any, label string) (*http.Response, error)

Migration:

// Old
resp, code, err := core.OpenStream(ctx, client, url, headers, body, label)
if err != nil {
    // use code or err
    _ = code
}

// New — status lives on *core.StreamError when the request fails
resp, err := core.OpenStream(ctx, client, url, headers, body, label)
if err != nil {
    var se *core.StreamError
    if errors.As(err, &se) {
        code := se.Code
        _ = code
    }
    return err
}
defer resp.Body.Close()
翻譯

OpenStream 不再回傳 HTTP status int。失敗時改以 *core.StreamError 承載 CodeBody/inner Err,呼叫端請用 errors.As 取出狀態碼。

Changes

BREAKING

翻譯
  • 變更 OpenStream 簽章:移除 status 回傳並改回 StreamError (@pardnchiu) [95b26bb]

FEAT

翻譯

UPDATE

翻譯
  • 將 OpenAI fast mode 的 service_tier 由 fast 改為 priority (@pardnchiu) [568315e]
  • reasoning delta 改為擇一輸出,不再串接雙欄位 (@pardnchiu) [95b26bb]
  • 改善各供應商串流/同步錯誤前綴與 body 長度上限 (@pardnchiu) [95b26bb]

REFACTOR

翻譯

Scope

  • core/stream.go, core/sse.go, core/type.go — BREAKING, FEAT, UPDATE, REFACTOR
  • core/gemini/ — FEAT (stream.go, send.go)
  • core/openai/, core/deepseek/, core/nvidia/, core/openRouter/, core/copilot/ — FEAT
  • core/grok/, core/compat/, core/claude/ — FEAT, REFACTOR
  • core/grokOauth/, core/openaiCodex/ — FEAT, UPDATE
  • core/cloudflare/ — FEAT (stream.go stub)
  • core/*/send.go — UPDATE (error prefixes, limits)

Generated by SKILL

v0.4.1

Choose a tag to compare

@pardnchiu pardnchiu released this 02 Aug 17:49
22cd048

v0.4.0 -> v0.4.1

Summary

Updates OpenRouter request attribution so outbound calls identify the client as agenvoy.com with a descriptive title.

翻譯

更新 OpenRouter 請求的歸屬資訊,讓外送呼叫以 agenvoy.com 與描述性標題識別用戶端。

Changes

UPDATE

  • Update OpenRouter attribution headers to agenvoy.com and X-OpenRouter-Title (@pardnchiu) [533cec8]
翻譯
  • 將 OpenRouter 歸屬標頭更新為 agenvoy.com 與 X-OpenRouter-Title (@pardnchiu) [533cec8]

Scope

  • core/openRouter/send.go — UPDATE

Generated by SKILL

v0.4.0

Choose a tag to compare

@pardnchiu pardnchiu released this 02 Aug 15:07
3df16ab

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.SendStreamAgent.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

v0.3.1

Choose a tag to compare

@pardnchiu pardnchiu released this 30 Jul 09:12
0061615

v0.3.0 -> v0.3.1

Summary

Copilot now discovers each model's supported API surface at runtime and caches the result across requests. OpenAI reasoning range detection also reads major and minor version numbers instead of assuming a fixed family prefix.

翻譯

Copilot 現在會在執行期探索各模型支援的 API 介面,並跨請求快取結果。OpenAI reasoning 範圍偵測也改為同時讀取主次版本號,不再假設固定的系列前綴。

Changes

FEAT

  • Resolve Copilot model endpoints dynamically with cached lookup (@pardnchiu) [b256ce7]
翻譯
  • 動態解析 Copilot 模型端點並快取查詢結果

REFACTOR

  • Generalize OpenAI model version parsing for reasoning effort ranges (@pardnchiu) [b256ce7]
翻譯
  • 泛化 OpenAI 模型版本解析,供 reasoning effort 範圍判斷使用

Scope

  • core/copilot/ — FEAT
  • core/reasoning.go — REFACTOR
  • core/*/models.go, core/*/usage.go, core/*/send.go, core/provider.go — REFACTOR

Generated by SKILL

v0.3.0

Choose a tag to compare

@pardnchiu pardnchiu released this 25 Jul 22:32
de401ba

v0.2.0 -> v0.3.0

Summary

Strengthens provider interoperability with typed reasoning controls and capability-aware model discovery. Response conversion now preserves complete content and reports provider failures consistently.

翻譯

透過型別化 reasoning 控制與能力感知的模型探索,強化各 provider 之間的互通性。回應轉換現在能保留完整內容,並一致回報 provider 錯誤。

⚠️ Breaking Changes

Agent reasoning arguments changed from string to core.Reasoning

The public Agent.Send and StreamAgent.SendStream methods no longer accept a string reasoning level. Callers must parse external input into core.Reasoning before invoking either method.

Before:

out, code, err := agent.Send(ctx, messages, tools, "high")
events, err := streamAgent.SendStream(ctx, messages, tools, "high")

After:

reasoning, ok := core.ParseReasoning("high")
if !ok {
    return fmt.Errorf("unknown reasoning level")
}

out, code, err := agent.Send(ctx, messages, tools, reasoning)
events, err := streamAgent.SendStream(ctx, messages, tools, reasoning)

Update every custom implementation of core.Agent and core.StreamAgent to use core.Reasoning in these method signatures. The supported levels are represented by core.ReasoningNone, core.ReasoningLow, core.ReasoningMedium, core.ReasoningHigh, core.ReasoningXHigh, and core.ReasoningMax.

翻譯

公開的 Agent.SendStreamAgent.SendStream 方法不再接受字串形式的 reasoning level。呼叫端必須先將外部輸入解析為 core.Reasoning,再呼叫這兩個方法;所有自訂的 core.Agentcore.StreamAgent 實作也必須更新方法簽章。

Capability-aware text-only model discovery

Provider model discovery now accepts core.ModelFilter, including the TextOnly option. Set TextOnly: true when an application needs models suitable for text generation only; providers then exclude known non-text model families such as image, audio, video, realtime, embedding, transcription, and moderation models. The filter is applied while listing supported models, so callers receive a provider-compatible text-model list without maintaining provider-specific exclusion logic.

Example:

models, err := openai.Models(ctx, config, core.ModelFilter{TextOnly: true})
翻譯

具備能力感知的純文字模型探索

Provider 的模型探索現在接受 core.ModelFilter,其中包含 TextOnly 選項。當應用程式只需要適合文字生成的模型時,可設定 TextOnly: true;各 provider 會在列出支援模型時排除已知的圖片、音訊、影片、即時、embedding、轉錄與 moderation 等非純文字模型系列。過濾會在模型列表階段執行,呼叫端不需要自行維護各 provider 的排除邏輯。

範例:

models, err := openai.Models(ctx, config, core.ModelFilter{TextOnly: true})

Changes

BREAKING

  • Replace string reasoning parameters with typed reasoning values and provider-specific capability limits (@pardnchiu) [260cccc]
翻譯
  • 以型別化 reasoning 值與各 provider 的能力限制取代字串 reasoning 參數

FIX

  • Preserve complete provider response content and surface streaming failures during aggregation (@pardnchiu) [1eb2456]
翻譯
  • 保留完整的 provider 回應內容,並在彙整時回報串流失敗

Scope

  • core/ — BREAKING, FIX
  • core/claude/ — BREAKING, FIX
  • core/copilot/ — BREAKING, FIX
  • core/gemini/ — BREAKING, FIX
  • core/grok/ — BREAKING, FIX
  • core/grokOauth/ — BREAKING, FIX
  • core/openai/ — BREAKING
  • core/openaiCodex/ — BREAKING, FIX
  • core/openRouter/ — BREAKING
  • core/cloudflare/ — BREAKING
  • core/compat/ — BREAKING
  • core/deepseek/ — BREAKING
  • core/nvidia/ — BREAKING

Generated by SKILL

v0.2.0

Choose a tag to compare

@pardnchiu pardnchiu released this 25 Jul 13:09
2042613

v0.1.2 -> v0.2.0

Summary

Introduces streaming responses across supported chat backends, corrects Gemini function-response role handling, and unifies the router’s public Go package naming. Public documentation and licensing now accompany the expanded integration surface.

翻譯

本版為支援的聊天後端導入串流回應,修正 Gemini 函式回應的角色處理,並統一路由器的公開 Go 套件命名。同步補齊公開文件與授權資訊,支援擴大的整合介面。

⚠️ Breaking Changes

Public Go package renamed from provider to core

The public package previously imported as github.com/pardnchiu/go-llm-router/provider is now imported as github.com/pardnchiu/go-llm-router/core. Update all imports and qualified references accordingly; no additional public API signature changes were introduced by this rename.

Migration:

// Old
import "github.com/pardnchiu/go-llm-router/provider"

func newAgent(config provider.Config) {
	client := provider.NewHTTPClient()
	_ = client
	_ = config
}

// New
import "github.com/pardnchiu/go-llm-router/core"

func newAgent(config core.Config) {
	client := core.NewHTTPClient()
	_ = client
	_ = config
}
翻譯

公開 Go 套件已由 provider 更名為 core。請將 github.com/pardnchiu/go-llm-router/provider 的所有 import 與限定名稱改為 github.com/pardnchiu/go-llm-router/corecore;此次重新命名未引入其他公開 API 簽章調整。

Changes

FEAT

翻譯
  • 新增串流 Agent 介面與 Claude SSE 串流支援
  • 新增 Copilot Chat 與 Responses API 串流支援

FIX

翻譯
  • 將空白 Gemini 訊息角色預設為 user
  • 將 Gemini 函式回應改用 user 角色

DOC

  • Add MIT license and regenerate bilingual public documentation (@pardnchiu) [3cdd918]
翻譯
  • 新增 MIT 授權並重新產生雙語公開文件

Scope

  • core/claude/ — FEAT, BREAKING
  • core/copilot/ — FEAT, BREAKING
  • core/gemini/ — FIX, BREAKING
  • core/ — BREAKING
  • README.md, doc/, LICENSE — DOC

Generated by SKILL

v0.1.2

Choose a tag to compare

@pardnchiu pardnchiu released this 16 Jul 19:26

v0.1.1 -> v0.1.2

Summary

NVIDIA gpt-oss models now floor at low reasoning instead of allowing none, keeping their minimum effort consistent with other reasoning-aware providers.

翻譯 NVIDIA gpt-oss 模型的最低 reasoning 等級收斂為 `low`,不再允許 `none`,與其他支援 reasoning 的 provider 行為一致。

Changes

ADD

  • Set minimum reasoning level to low for NVIDIA gpt-oss models (@pardnchiu) [a7d70ac]
翻譯
  • 為 NVIDIA gpt-oss 模型設定最低 reasoning 等級為 low

Scope

  • core/provider.go — ADD

Generated by SKILL