Luis Pater
7726a44ca2
Merge pull request #212 from Skyuno/fix/orphaned-tool-results
...
fix(kiro): filter orphaned tool_results from compacted conversations
2026-02-11 21:06:20 +08:00
Luis Pater
dc55fb0ce3
Merge pull request #211 from Skyuno/fix/kiro-websearch
...
fix(kiro): fully implement Kiro web search tool via MCP integration
2026-02-11 21:05:21 +08:00
Luis Pater
e9dd44e623
Merge pull request #209 from Buywatermelon/feature/default-kiro-aliases
...
feat(config): add default Kiro model aliases for standard Claude model names
2026-02-11 15:09:00 +08:00
Luis Pater
cc8c4ffb5f
Merge branch 'router-for-me:main' into main
v6.8.11-0
2026-02-11 15:07:06 +08:00
Luis Pater
1510bfcb6f
fix(translator): improve content handling for system and user messages
...
- Added support for single and array-based `content` cases.
- Enhanced `system_instruction` structure population logic.
- Improved handling of user role assignment for string-based `content`.
2026-02-11 15:04:01 +08:00
Skyuno
09b19f5c4e
fix(kiro): filter orphaned tool_results from compacted conversations
2026-02-11 00:23:05 +08:00
Skyuno
7b01ca0e2e
fix(kiro): implement web search MCP integration for streaming and non-streaming paths
...
Add complete web search functionality that routes pure web_search requests to the Kiro MCP endpoint instead of the normal GAR API.
Executor changes (kiro_executor.go):
- Add web_search detection in Execute() and ExecuteStream() entry points using HasWebSearchTool() to intercept pure web_search requests before normal processing
- Add 'kiro' format passthrough in buildKiroPayloadForFormat() for pre-built payloads used by callKiroRawAndBuffer()
- Implement handleWebSearchStream(): streaming search loop with MCP search -> InjectToolResultsClaude -> callKiroAndBuffer, supporting up to 5 search iterations with model-driven re-search
- Implement handleWebSearch(): non-streaming path that performs single MCP search, injects tool results, calls normal Execute path, and appends server_tool_use indicators to response
- Add helper methods: callKiroAndBuffer(), callKiroRawAndBuffer(), callKiroDirectStream(), sendFallbackText(), executeNonStreamFallback()
Web search core logic (kiro_websearch.go) [NEW]:
- Define MCP JSON-RPC 2.0 types (McpRequest, McpResponse, McpResult, McpContent, McpError)
- Define WebSearchResults/WebSearchResult structs for parsing MCP search results
- HasWebSearchTool(): detect pure web_search requests (single-tool array only)
- ContainsWebSearchTool(): detect web_search in mixed-tool arrays
- ExtractSearchQuery(): parse search query from Claude Code's tool_use message format
- CreateMcpRequest(): build MCP tools/call request with Kiro-compatible ID format
- InjectToolResultsClaude(): append assistant tool_use + user tool_result messages to Claude-format payload for GAR translation pipeline
- InjectToolResults(): modify Kiro-format payload directly with toolResults in currentMessage context
- InjectSearchIndicatorsInResponse(): prepend server_tool_use + web_search_tool_result content blocks to non-streaming response for Claude Code search count display
- ReplaceWebSearchToolDescription(): swap restrictive Kiro tool description with minimal re-search-friendly version
- StripWebSearchTool(): remove web_search from tools array
- FormatSearchContextPrompt() / FormatToolResultText(): format search results for injection
- SSE event generation: SseEvent type, GenerateWebSearchEvents() (11-event sequence), GenerateSearchIndicatorEvents() (server_tool_use + web_search_tool_result pairs)
- Stream analysis: AnalyzeBufferedStream() to detect stop_reason and web_search tool_use in buffered chunks, FilterChunksForClient() to strip tool_use blocks and adjust indices, AdjustSSEChunk() / AdjustStreamIndices() for content block index offset management
MCP API handler (kiro_websearch_handler.go) [NEW]:
- WebSearchHandler struct with MCP endpoint, HTTP client, auth token, fingerprint, and custom auth attributes
- FetchToolDescription(): sync.Once-guarded MCP tools/list call to cache web_search tool description
- GetWebSearchDescription(): thread-safe cached description retrieval
- CallMcpAPI(): MCP API caller with retry logic (exponential backoff, retryable on 502/503/504), AWS-aligned headers via setMcpHeaders()
- ParseSearchResults(): extract WebSearchResults from MCP JSON-RPC response
- setMcpHeaders(): set Content-Type, Kiro agent headers, dynamic fingerprint User-Agent, AWS SDK identifiers, Bearer auth, and custom auth attributes
Claude request translation (kiro_claude_request.go):
- Rename web_search -> remote_web_search in convertClaudeToolsToKiro() with dynamic description from GetWebSearchDescription() or hardcoded fallback
- Rename web_search -> remote_web_search in BuildAssistantMessageStruct() for tool_use content blocks
- Add remoteWebSearchDescription constant as fallback when MCP tools/list hasn't been fetched
2026-02-11 00:02:30 +08:00
Skyuno
fe6fc628ed
Revert "fix: filter out web_search/websearch tools unsupported by Kiro API"
...
This reverts commit 5dc936a9a4 .
2026-02-10 22:24:46 +08:00
Skyuno
8192eeabc8
Revert "feat: inject web_search alternative hint instead of silently filtering"
...
This reverts commit 3c7a5afdcc .
2026-02-10 22:24:46 +08:00
y
c3f1cdd7e5
feat(config): add default Kiro model aliases for standard Claude model names
...
Kiro models are exposed with kiro- prefix (e.g., kiro-claude-sonnet-4-5),
which prevents clients like Claude Code from using standard model names
(e.g., claude-sonnet-4-20250514).
This change injects default oauth-model-alias entries for the kiro channel
when no user-configured aliases exist, following the same pattern as the
existing Antigravity defaults. The aliases map standard Claude model names
(both with and without date suffixes) to their kiro-prefixed counterparts.
Default aliases added:
- claude-sonnet-4-5-20250929 / claude-sonnet-4-5 → kiro-claude-sonnet-4-5
- claude-sonnet-4-20250514 / claude-sonnet-4 → kiro-claude-sonnet-4
- claude-opus-4-6 → kiro-claude-opus-4-6
- claude-opus-4-5-20251101 / claude-opus-4-5 → kiro-claude-opus-4-5
- claude-haiku-4-5-20251001 / claude-haiku-4-5 → kiro-claude-haiku-4-5
All aliases use fork: true to preserve the original kiro-* names.
User-configured kiro aliases are respected and not overridden.
Closes router-for-me/CLIProxyAPIPlus#208
2026-02-10 19:01:07 +08:00
Chén Mù
c6bd91b86b
Merge pull request #1519 from router-for-me/thinking
...
feat(translator): support Claude thinking type adaptive
2026-02-10 18:31:56 +08:00
hkfires
349ddcaa89
fix(registry): correct max completion tokens for opus 4.6 thinking
2026-02-10 18:05:40 +08:00
hkfires
938a799263
feat(translator): support Claude thinking type adaptive
2026-02-10 16:20:32 +08:00
Luis Pater
e17d4f8d98
Merge pull request #207 from router-for-me/plus
...
v6.8.9
v6.8.9-0
2026-02-10 15:43:45 +08:00
Luis Pater
c8cae1f74d
Merge branch 'main' into plus
2026-02-10 15:43:31 +08:00
Luis Pater
0040d78496
refactor(sdk): simplify provider lifecycle and registration logic
2026-02-10 15:39:26 +08:00
hkfires
896de027cc
docs(config): reorder antigravity model alias example
2026-02-10 10:13:54 +08:00
hkfires
fc329ebf37
docs(config): simplify oauth model alias example
2026-02-10 10:12:28 +08:00
Luis Pater
91841a5519
Merge branch 'router-for-me:main' into main
v6.8.8-0
2026-02-10 02:10:29 +08:00
Luis Pater
eaab1d6824
Merge pull request #1506 from masrurimz/fix-sse-model-mapping
...
fix(amp): rewrite response.model in Responses API SSE events
2026-02-10 02:08:11 +08:00
Muhammad Zahid Masruri
0cfe310df6
ci: retrigger workflows
...
Amp-Thread-ID: https://ampcode.com/threads/T-019c264f-1cb9-7420-a68b-876030db6716
2026-02-10 00:09:11 +07:00
Muhammad Zahid Masruri
918b6955e4
fix(amp): rewrite model name in response.model for Responses API SSE events
...
The ResponseRewriter's modelFieldPaths was missing 'response.model',
causing the mapped model name to leak through SSE streaming events
(response.created, response.in_progress, response.completed) in the
OpenAI Responses API (/v1/responses).
This caused Amp CLI to report 'Unknown OpenAI model' errors when
model mapping was active (e.g., gpt-5.2-codex -> gpt-5.3-codex),
because the mapped name reached Amp's backend via telemetry.
Also sorted modelFieldPaths alphabetically per review feedback
and added regression tests for all rewrite paths.
Fixes #1463
2026-02-09 23:52:59 +07:00
Luis Pater
532fbf00d4
Merge pull request #204 from router-for-me/plus
...
v6.8.7
v6.8.7-0
2026-02-09 20:00:36 +08:00
Luis Pater
45b6fffd7f
Merge branch 'main' into plus
2026-02-09 20:00:16 +08:00
Luis Pater
5a3eb08739
Merge pull request #1502 from router-for-me/iflow
...
feat(executor): add session ID and HMAC-SHA256 signature generation for iFlow API requests
2026-02-09 19:56:12 +08:00
Luis Pater
0dff329162
Merge pull request #1492 from router-for-me/management
...
fix(management): ensure management.html is available synchronously and improve asset sync handling
2026-02-09 19:55:21 +08:00
hkfires
49c1740b47
feat(executor): add session ID and HMAC-SHA256 signature generation for iFlow API requests
2026-02-09 19:29:42 +08:00
hkfires
3fbee51e9f
fix(management): ensure management.html is available synchronously and improve asset sync handling
2026-02-09 08:32:58 +08:00
Luis Pater
a3dc56d2a0
Merge branch 'router-for-me:main' into main
v6.8.6-0
2026-02-09 02:07:02 +08:00
Luis Pater
63643c44a1
Fixed : #1484
...
fix(translator): restructure message content handling to support multiple content types
- Consolidated `input_text` and `output_text` handling into a single case.
- Added support for processing `input_image` content with associated URLs.
2026-02-09 02:05:38 +08:00
Luis Pater
1d93608dbe
Merge pull request #203 from JokerRun/fix/copilot-premium-usage-inflation
...
fix(copilot): prevent premium request count inflation for Claude models
v6.8.5-1
2026-02-08 20:42:51 +08:00
Luis Pater
d125b7de92
Merge pull request #199 from ravindrabarthwal/add-claude-opus-4.6-github-copilot
...
feat: add Claude Opus 4.6 to GitHub Copilot models
2026-02-08 20:41:20 +08:00
Luis Pater
d5654ee316
Merge branch 'router-for-me:main' into main
v6.8.5-0
2026-02-08 20:40:18 +08:00
Luis Pater
3b34521ad9
Merge pull request #1479 from router-for-me/management
...
refactor(management): streamline control panel management and implement sync throttling
2026-02-08 20:37:29 +08:00
hkfires
7197fb350b
fix(config): prune default descendants when merging new yaml nodes
2026-02-08 19:05:52 +08:00
hkfires
6e349bfcc7
fix(config): avoid writing known defaults during merge
2026-02-08 18:47:44 +08:00
hkfires
234056072d
refactor(management): streamline control panel management and implement sync throttling
2026-02-08 10:42:49 +08:00
rico
76330f4bff
feat(copilot): add Claude Opus 4.6 model definition
...
> 添加 copilot claude opus 4.6 支持 (ref: PR #199 )
2026-02-08 02:38:06 +08:00
rico
d468eec6ec
fix(copilot): prevent premium request count inflation for Claude models
...
> Copilot Premium usage significantly amplified when using amp
- Add X-Initiator header (user/agent) based on last message role to
prevent Copilot from billing all requests as premium user-initiated
- Add flattenAssistantContent() to convert assistant content from array
to string, preventing Claude from re-answering all previous prompts
- Align Copilot headers (User-Agent, Editor-Version, Openai-Intent) with
pi-ai reference implementation
Closes #113
Amp-Thread-ID: https://ampcode.com/threads/T-019c392b-736e-7489-a06b-f94f7c75f7c0
Co-authored-by: Amp <amp@ampcode.com >
2026-02-08 02:22:10 +08:00
Ravindra Barthwal
9bc6cc5b41
feat: add Claude Opus 4.6 to GitHub Copilot models
...
GitHub Copilot now supports claude-opus-4.6 but it was missing from
the proxy's model definitions. Fixes #196 .
2026-02-07 14:58:34 +05:30
Luis Pater
d109be159c
Merge pull request #197 from router-for-me/plus
...
v6.8.4
v6.8.4-0
2026-02-07 09:37:04 +08:00
Luis Pater
eddf31e55b
Merge branch 'main' into plus
2026-02-07 09:36:52 +08:00
Luis Pater
7e9d0db6aa
Merge pull request #1467 from dusty-du/fix/kimi-toolcall-reasoning-content
...
Fix Kimi tool-call payload normalization for reasoning_content
2026-02-07 09:35:04 +08:00
Luis Pater
2f1874ede5
chore(docs): remove Cubence sponsorship from README files and delete related asset
2026-02-07 08:55:14 +08:00
Luis Pater
6b83585b53
Merge branch 'router-for-me:main' into main
v6.8.3-0
2026-02-07 08:52:51 +08:00
Luis Pater
78ef04fcf1
fix(kimi): reduce redundant payload cloning and simplify translation calls
2026-02-07 08:51:48 +08:00
hkfires
b7e4f00c5f
fix(translator): correct gemini-cli log prefix
2026-02-07 08:40:09 +08:00
Luis Pater
c20507c15e
Merge branch 'router-for-me:main' into main
v6.8.2-0
2026-02-07 06:43:17 +08:00
Luis Pater
f7d0019df7
fix(kimi): update base URL and integrate ClaudeExecutor fallback
...
- Updated `KimiAPIBaseURL` to remove versioning from the root path.
- Integrated `ClaudeExecutor` fallback in `KimiExecutor` methods for compatibility with Claude requests.
- Simplified token counting by delegating to `ClaudeExecutor`.
2026-02-07 06:42:08 +08:00
test
52364af5bf
Fix Kimi tool-call reasoning_content normalization
2026-02-06 14:46:16 -05:00