mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-09-03 06:35:00 +08:00
feat(interactions): add support for Google Interactions
- Introduced API handlers and executor logic for Google Interactions - Added request and response transformations for OpenAI and Claude Interactions. - Integrated Gemini API with Interactions support. - Updated tests to validate Interactions request parsing and error handling. - Refactored translator logic for Interactions data flows.
This commit is contained in:
@@ -12,6 +12,7 @@ import (
|
||||
_ "github.com/router-for-me/CLIProxyAPI/v7/internal/thinking/provider/claude"
|
||||
_ "github.com/router-for-me/CLIProxyAPI/v7/internal/thinking/provider/codex"
|
||||
_ "github.com/router-for-me/CLIProxyAPI/v7/internal/thinking/provider/gemini"
|
||||
_ "github.com/router-for-me/CLIProxyAPI/v7/internal/thinking/provider/interactions"
|
||||
_ "github.com/router-for-me/CLIProxyAPI/v7/internal/thinking/provider/kimi"
|
||||
_ "github.com/router-for-me/CLIProxyAPI/v7/internal/thinking/provider/openai"
|
||||
_ "github.com/router-for-me/CLIProxyAPI/v7/internal/thinking/provider/xai"
|
||||
@@ -2363,6 +2364,30 @@ func TestThinkingE2ENewProviderTargets(t *testing.T) {
|
||||
expectField: "reasoning.effort",
|
||||
expectValue: "high",
|
||||
},
|
||||
|
||||
// Interactions target: native API uses generation_config.thinking_level and thinking_summaries.
|
||||
{
|
||||
name: "I1",
|
||||
from: "interactions",
|
||||
to: "interactions",
|
||||
model: "gemini-zero-mixed-model",
|
||||
inputJSON: `{"model":"gemini-zero-mixed-model","generation_config":{"thinking_level":"high","thinking_summaries":"auto"},"input":"hi"}`,
|
||||
expectField: "generation_config.thinking_level",
|
||||
expectValue: "high",
|
||||
expectField2: "generation_config.thinking_summaries",
|
||||
expectValue2: "auto",
|
||||
},
|
||||
{
|
||||
name: "I2",
|
||||
from: "interactions",
|
||||
to: "interactions",
|
||||
model: "gemini-zero-mixed-model(8192)",
|
||||
inputJSON: `{"model":"gemini-zero-mixed-model(8192)","input":"hi"}`,
|
||||
expectField: "generation_config.thinking_level",
|
||||
expectValue: "medium",
|
||||
expectField2: "generation_config.thinking_summaries",
|
||||
expectValue2: "auto",
|
||||
},
|
||||
}
|
||||
|
||||
runThinkingTests(t, cases)
|
||||
|
||||
Reference in New Issue
Block a user