Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
553d6f5
fix: sanitize tool_use.id to comply with Claude API regex ^[a-zA-Z0-9…
woqiqishi Mar 5, 2026
97fdd2e
fix: preserve original JSON bytes in normalizeCacheControlTTL when no…
thebtf Mar 5, 2026
ce8cc1b
fix(translator): pass through adaptive thinking effort
hkfires Mar 6, 2026
242aecd
feat(registry): add gemini-3.1-flash-image-preview model definition
Mar 6, 2026
11a795a
fix: surface upstream error details in Gemini CLI OAuth onboarding UI
thebtf Mar 6, 2026
7c12999
fix(openai-compat): improve pool fallback and preserve adaptive thinking
xiaobendan483600 Mar 7, 2026
dae8463
fix(registry): clone model snapshots and invalidate available-model c…
xiaobendan483600 Mar 7, 2026
97ef633
fix(registry): address review feedback
xiaobendan483600 Mar 7, 2026
a02eda5
fix(openai-compat): address review feedback
xiaobendan483600 Mar 7, 2026
522a68a
fix(openai-compat): retry empty bootstrap streams
xiaobendan483600 Mar 7, 2026
a52da26
fix(auth): stop draining stream pool goroutines after context cancell…
xiaobendan483600 Mar 7, 2026
099e734
fix(registry): always clone available model snapshots
xiaobendan483600 Mar 7, 2026
3a18f6f
fix(registry): clone slice fields in model map output
xiaobendan483600 Mar 7, 2026
38277c1
Merge pull request #1875 from woqiqishi/fix/tool-use-id-sanitize
luispater Mar 7, 2026
1042489
Merge pull request #1893 from thebtf/fix/normalize-ttl-byte-preservat…
luispater Mar 7, 2026
ca90487
Merge branch 'main' into feature/add-gemini-3.1-flash-image-preview
luispater Mar 7, 2026
98a1bb5
Merge pull request #1900 from rex-zsd/feature/add-gemini-3.1-flash-im…
luispater Mar 7, 2026
e9c60a0
Merge pull request #1910 from thebtf/fix/gemini-oauth-error-messages
luispater Mar 7, 2026
631e5c8
Merge pull request #1922 from shenshuoyaoyouguang/pr/model-registry-s…
luispater Mar 7, 2026
b915371
Merge pull request #1925 from shenshuoyaoyouguang/pr/openai-compat-po…
luispater Mar 7, 2026
2b134fc
test(auth-scheduler): add unit tests and scheduler implementation
luispater Mar 7, 2026
424711b
fix(executor): use aiplatform base url for vertex api key calls
hkfires Mar 8, 2026
15dd5db
Merge pull request #1956 from router-for-me/vertex
luispater Mar 8, 2026
4f48e52
Merge pull request #1957 from router-for-me/thinking
luispater Mar 8, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions config.example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,17 @@ nonstream-keepalive-interval: 0
# models: # The models supported by the provider.
# - name: "moonshotai/kimi-k2:free" # The actual model name.
# alias: "kimi-k2" # The alias used in the API.
# # You may repeat the same alias to build an internal model pool.
# # The client still sees only one alias in the model list.
# # Requests to that alias will round-robin across the upstream names below,
# # and if the chosen upstream fails before producing output, the request will
# # continue with the next upstream model in the same alias pool.
# - name: "qwen3.5-plus"
# alias: "claude-opus-4.66"
# - name: "glm-5"
# alias: "claude-opus-4.66"
# - name: "kimi-k2.5"
# alias: "claude-opus-4.66"

# Vertex API keys (Vertex-compatible endpoints, use API key + base URL)
# vertex-api-key:
Expand Down
16 changes: 8 additions & 8 deletions internal/api/handlers/management/auth_files.go
Original file line number Diff line number Diff line change
Expand Up @@ -1306,12 +1306,12 @@ func (h *Handler) RequestGeminiCLIToken(c *gin.Context) {
projects, errAll := onboardAllGeminiProjects(ctx, gemClient, &ts)
if errAll != nil {
log.Errorf("Failed to complete Gemini CLI onboarding: %v", errAll)
SetOAuthSessionError(state, "Failed to complete Gemini CLI onboarding")
SetOAuthSessionError(state, fmt.Sprintf("Failed to complete Gemini CLI onboarding: %v", errAll))
return
}
if errVerify := ensureGeminiProjectsEnabled(ctx, gemClient, projects); errVerify != nil {
log.Errorf("Failed to verify Cloud AI API status: %v", errVerify)
SetOAuthSessionError(state, "Failed to verify Cloud AI API status")
SetOAuthSessionError(state, fmt.Sprintf("Failed to verify Cloud AI API status: %v", errVerify))
return
}
ts.ProjectID = strings.Join(projects, ",")
Expand All @@ -1320,7 +1320,7 @@ func (h *Handler) RequestGeminiCLIToken(c *gin.Context) {
ts.Auto = false
if errSetup := performGeminiCLISetup(ctx, gemClient, &ts, ""); errSetup != nil {
log.Errorf("Google One auto-discovery failed: %v", errSetup)
SetOAuthSessionError(state, "Google One auto-discovery failed")
SetOAuthSessionError(state, fmt.Sprintf("Google One auto-discovery failed: %v", errSetup))
return
}
if strings.TrimSpace(ts.ProjectID) == "" {
Expand All @@ -1331,19 +1331,19 @@ func (h *Handler) RequestGeminiCLIToken(c *gin.Context) {
isChecked, errCheck := checkCloudAPIIsEnabled(ctx, gemClient, ts.ProjectID)
if errCheck != nil {
log.Errorf("Failed to verify Cloud AI API status: %v", errCheck)
SetOAuthSessionError(state, "Failed to verify Cloud AI API status")
SetOAuthSessionError(state, fmt.Sprintf("Failed to verify Cloud AI API status: %v", errCheck))
return
}
ts.Checked = isChecked
if !isChecked {
log.Error("Cloud AI API is not enabled for the auto-discovered project")
SetOAuthSessionError(state, "Cloud AI API not enabled")
SetOAuthSessionError(state, fmt.Sprintf("Cloud AI API not enabled for project %s", ts.ProjectID))
return
}
} else {
if errEnsure := ensureGeminiProjectAndOnboard(ctx, gemClient, &ts, requestedProjectID); errEnsure != nil {
log.Errorf("Failed to complete Gemini CLI onboarding: %v", errEnsure)
SetOAuthSessionError(state, "Failed to complete Gemini CLI onboarding")
SetOAuthSessionError(state, fmt.Sprintf("Failed to complete Gemini CLI onboarding: %v", errEnsure))
return
}

Expand All @@ -1356,13 +1356,13 @@ func (h *Handler) RequestGeminiCLIToken(c *gin.Context) {
isChecked, errCheck := checkCloudAPIIsEnabled(ctx, gemClient, ts.ProjectID)
if errCheck != nil {
log.Errorf("Failed to verify Cloud AI API status: %v", errCheck)
SetOAuthSessionError(state, "Failed to verify Cloud AI API status")
SetOAuthSessionError(state, fmt.Sprintf("Failed to verify Cloud AI API status: %v", errCheck))
return
}
ts.Checked = isChecked
if !isChecked {
log.Error("Cloud AI API is not enabled for the selected project")
SetOAuthSessionError(state, "Cloud AI API not enabled")
SetOAuthSessionError(state, fmt.Sprintf("Cloud AI API not enabled for project %s", ts.ProjectID))
return
}
}
Expand Down
26 changes: 26 additions & 0 deletions internal/registry/model_definitions_static_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,21 @@ func GetGeminiModels() []*ModelInfo {
SupportedGenerationMethods: []string{"generateContent", "countTokens", "createCachedContent", "batchGenerateContent"},
Thinking: &ThinkingSupport{Min: 128, Max: 32768, ZeroAllowed: false, DynamicAllowed: true, Levels: []string{"low", "high"}},
},
{
ID: "gemini-3.1-flash-image-preview",
Object: "model",
Created: 1771459200,
OwnedBy: "google",
Type: "gemini",
Name: "models/gemini-3.1-flash-image-preview",
Version: "3.1",
DisplayName: "Gemini 3.1 Flash Image Preview",
Description: "Gemini 3.1 Flash Image Preview",
InputTokenLimit: 1048576,
OutputTokenLimit: 65536,
SupportedGenerationMethods: []string{"generateContent", "countTokens", "createCachedContent", "batchGenerateContent"},
Thinking: &ThinkingSupport{Min: 128, Max: 32768, ZeroAllowed: false, DynamicAllowed: true, Levels: []string{"minimal", "high"}},
},
{
ID: "gemini-3-flash-preview",
Object: "model",
Expand Down Expand Up @@ -339,6 +354,17 @@ func GetGeminiVertexModels() []*ModelInfo {
SupportedGenerationMethods: []string{"generateContent", "countTokens", "createCachedContent", "batchGenerateContent"},
Thinking: &ThinkingSupport{Min: 128, Max: 32768, ZeroAllowed: false, DynamicAllowed: true, Levels: []string{"low", "high"}},
},
{
ID: "gemini-3.1-flash-image-preview",
Object: "model",
Created: 1771459200,
OwnedBy: "google",
Type: "gemini",
Name: "models/gemini-3.1-flash-image-preview",
Version: "3.1",
DisplayName: "Gemini 3.1 Flash Image Preview",
Description: "Gemini 3.1 Flash Image Preview",
},
{
ID: "gemini-3.1-flash-lite-preview",
Object: "model",
Expand Down
Loading
Loading