Skip to content

Support for anthropic models#131

Merged
dimavrem22 merged 13 commits intomainfrom
anthropic-here-we-gooo
Feb 4, 2026
Merged

Support for anthropic models#131
dimavrem22 merged 13 commits intomainfrom
anthropic-here-we-gooo

Conversation

@dimavrem22
Copy link
Contributor

@dimavrem22 dimavrem22 commented Feb 3, 2026

  • added anthropic models and anthropic llm client (with rate limits exponential decay)
  • all of the new specialized agents (network spy, trace hound, and docs digger) can use openai or anthropic models
  • added unit tests to anthropic llm client and for the vendors

@dimavrem22 dimavrem22 marked this pull request as ready for review February 3, 2026 23:16
@dimavrem22
Copy link
Contributor Author

@claude review pretty pretty please

@claude

This comment was marked as resolved.

@claude

This comment was marked as resolved.

@alex-w-99

This comment was marked as resolved.

@dimavrem22
Copy link
Contributor Author

@claude check again!

@claude

This comment was marked as resolved.

@dimavrem22
Copy link
Contributor Author

@claude

@claude

This comment was marked as resolved.

Copy link
Contributor

@rayruizhiliao rayruizhiliao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we update README, where OpenAI API key is currently mentioned as a prerequisite? And also code snippet

# Set your OpenAI API key
export OPENAI_API_KEY="sk-..."

@dimavrem22
Copy link
Contributor Author

dimavrem22 commented Feb 4, 2026

for now discovery and guide agent still require openai models because of vectorstores. Only specialized agents can be run with anthropic currently. so i think we should keep the docs as is for now

@rayruizhiliao rayruizhiliao dismissed their stale review February 4, 2026 15:15

Dima: for now discovery and guide agent still require openai models because of vectorstores. Only specialized agents can be run with anthropic currently. so i think we should keep the docs as is for now

@dimavrem22 dimavrem22 force-pushed the anthropic-here-we-gooo branch from b79493d to 919ee83 Compare February 4, 2026 15:35
@dimavrem22 dimavrem22 merged commit 48657a1 into main Feb 4, 2026
13 checks passed
@dimavrem22 dimavrem22 deleted the anthropic-here-we-gooo branch February 4, 2026 17:31
@claude
Copy link

claude bot commented Feb 4, 2026

Code Review

I found an issue during the code review:

Issue: Missing "none" tool_choice handling

Files affected:

  • bluebox/llms/openai_client.py (lines 104-106)
  • bluebox/llms/anthropic_client.py (lines 149-156)

Description:

The abstract base class AbstractLLMVendorClient documents "none" as a valid tool_choice option:

https://github.com/VectorlyApp/bluebox-sdk/blob/d5c9b19a2695c2e658323afee1ed94737e569846/bluebox/llms/abstract_llm_vendor_client.py#L128-L134

However, neither the OpenAIClient nor the AnthropicClient handle this value correctly. When tool_choice="none" is passed:

OpenAI Client: Incorrectly converts it to {"type": "function", "name": "none"} instead of passing "none" directly (which is the correct format for OpenAI's API).

https://github.com/VectorlyApp/bluebox-sdk/blob/d5c9b19a2695c2e658323afee1ed94737e569846/bluebox/llms/openai_client.py#L103-L107

Anthropic Client: Incorrectly converts it to {"type": "tool", "name": "none"}. However, Anthropic's Messages API doesn't have a "none" equivalent - to disable tools, you simply don't include them in the request.

https://github.com/VectorlyApp/bluebox-sdk/blob/d5c9b19a2695c2e658323afee1ed94737e569846/bluebox/llms/anthropic_client.py#L148-L157

Recommendation:

  1. OpenAI Client: Add "none" to the list of pass-through values:

    if tool_choice is not None and tool_choice not in ["auto", "required", "none"]:
        return {"type": "function", "name": tool_choice}
    return tool_choice
  2. Anthropic Client: Either:

    • Add a check to handle "none" (perhaps by returning None to skip tool_choice entirely)
    • Remove "none" from the abstract base class documentation if it's not universally supported

Impact: Users attempting to use tool_choice="none" will encounter API errors since both clients treat it as a tool name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants