Repository navigation
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (8)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughDeepSeek Anthropic channels now support Anthropic native tools. Candidate selection preserves DeepSeek channels, and outbound conversion preserves web-search tools with their configured usage limits. Tests cover channel classification, selection, and conversion. ChangesDeepSeek native tool support
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to DeepSeek Anthropic requests now retain native web-search tools and their configured usage limits while unsupported channels remain excluded. The change is covered across routing and outbound conversion and is ready to merge. Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🟡 Changes recommended
The newly added orchestrator test helper returns a named slice type without conversion (won’t compile), and there remains a capability mismatch risk around anthropic_gcp being marked as supporting native tools while the outbound transformer still treats PlatformVertex as unsupported.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR updates Anthropic-native tool capability detection so DeepSeek’s Anthropic-compatible channel remains eligible when requests include the native web_search_20250305 tool, and adds regression tests to ensure web_search survives outbound conversion for DeepSeek.
Changes:
- Mark DeepSeek’s Anthropic transformer platform as supporting Anthropic native tools (so
web_searchis no longer filtered out). - Mark
deepseek_anthropicchannel type as supporting Anthropic native tools (so candidate selection keeps it in mixed candidate sets). - Extend outbound transformer tests to assert
web_search_20250305conversion details (includingmax_uses) for DeepSeek, plus add orchestrator selector regression coverage.
File summaries
| File | Description |
|---|---|
| llm/transformer/anthropic/tools.go | Treat PlatformDeepSeek as supporting Anthropic native tools. |
| llm/transformer/anthropic/tools_test.go | Add PlatformDeepSeek coverage for native-tool support detection. |
| llm/transformer/anthropic/outbound_test.go | Update filtering expectations so DeepSeek preserves native tools; assert web_search_20250305 + max_uses. |
| llm/transformer/anthropic/outbound_convert.go | Clarify conversion comment about filtering based on native-tool support. |
| internal/server/orchestrator/candidates_anthropic.go | Update selector docs/examples to reflect DeepSeek support. |
| internal/server/orchestrator/candidates_anthropic_test.go | New regression test ensuring DeepSeek remains in compatible candidate set. |
| internal/ent/channel/type.go | Include TypeDeepseekAnthropic in SupportsAnthropicNativeTools(). |
| internal/ent/channel/type_test.go | Update expectation: deepseek_anthropic supports Anthropic native tools. |
Review details
- Files reviewed: 8/8 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| func (s staticAnthropicCandidateSelector) Select(context.Context, *llm.Request) ([]*ChannelModelsCandidate, error) { | ||
| return s, nil | ||
| } |
| return t == TypeAnthropic || t == TypeAnthropicAWS || t == TypeAnthropicGcp || | ||
| t == TypeClaudecode || t == TypeDeepseekAnthropic |
(cherry picked from commit 9f31056)
Fixes #2226
DeepSeek's Anthropic-compatible Messages API supports the native
web_search_20250305server tool, but AxonHub currently marks bothdeepseek_anthropicandPlatformDeepSeekas not supporting Anthropic native tools. In mixed candidate sets this filters out the DeepSeek channel, and outbound conversion also removes the tool definition.This change aligns both existing capability checks so DeepSeek Anthropic channels remain eligible and the native web-search definition is preserved in the outbound request. Other Anthropic-compatible channels remain unchanged.
DeepSeek's official
deepseek-harnesssends this exact tool type to its Anthropic-compatible Messages endpoint:https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/web/web-search-deepseek/src/provider.ts
Verification:
web_search_20250305type andmax_usesvalue.go test ./transformer/anthropic -count=1go test ./internal/ent/channel -count=1go test ./internal/server/orchestrator -count=1🤖 Assisted by OpenAI Codex.
Summary by CodeRabbit
New Features
Tests