Skip to content

[agent farm] (Run ID: codestoryai_sidecar_issue_2092_22ab5de3) #2093

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

theskcd
Copy link
Contributor

@theskcd theskcd commented Feb 24, 2025

agent_instance: codestoryai_sidecar_issue_2092_22ab5de3 Tries to fix: #2092

🔧 LLM Client Enhancement: Added thinking_budget field to the LLM completion request types

  • Added: Optional thinking_budget field to LLMClientCompletionRequest struct with corresponding setter method following builder pattern
  • Updated: Core struct initialization while maintaining existing APIs

👥 Please review these changes for the agent farm implementation.

@maan2003
Copy link
Contributor

/agent use it in anthropic.rs

example:

curl https://api.anthropic.com/v1/messages \
     --header "x-api-key: $ANTHROPIC_API_KEY" \
     --header "anthropic-version: 2023-06-01" \
     --header "content-type: application/json" \
     --data \
'{
    "model": "claude-3-7-sonnet-20250219",
    "max_tokens": 20000,
    "thinking": {
        "type": "enabled",
        "budget_tokens": 16000
    },
    "messages": [
        {
            "role": "user",
            "content": "Are there an infinite number of prime numbers such that n mod 4 == 3?"
        }
    ]
}'

@theskcd
Copy link
Contributor Author

theskcd commented Feb 24, 2025

🛠️ Feature Addition: Implemented thinking budget support for Claude 3 API integration

  • Added: Configurable thinking budget parameter (budget_tokens) for both completion request types with getters/setters following builder pattern
  • Updated: Anthropic request serialization to include thinking field with proper cache control headers
  • Added: Unit tests to verify thinking budget functionality

Please review the changes, particularly the API request handling for Claude models 🔍

@maan2003
Copy link
Contributor

/agent run cargo check

@theskcd
Copy link
Contributor Author

theskcd commented Feb 24, 2025

/q what are you upto?

@theskcd
Copy link
Contributor Author

theskcd commented Feb 24, 2025

🔄 In Progress: Fixing compilation errors in thinking budget implementation

  • Issues: Multiple Rust compile errors related to struct fields and method implementations
  • Next Step: Need to add proper struct definitions and fix field references in both types.rs and anthropic.rs

Will share an update once compilation errors are resolved 🛠️

@theskcd
Copy link
Contributor Author

theskcd commented Feb 24, 2025

🔧 LLM Client Enhancement: Added thinking_budget support for Claude 3 API integration

  • Added: New AnthropicThinking struct with budget control fields and corresponding request serialization
  • Updated: Core completion request types with thinking budget getters/setters
  • Fixed: Request builders to properly handle thinking budget parameters

🔍 Please review these changes to support Claude's new thinking budget feature.

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.

[agent farm]
2 participants