Skip to content

Conversation

jordibeen
Copy link
Contributor

This fixes addresses a compatibility issue with Claude's latest model release, claude-opus-4-1-20250805.

This model version does not allow for sending along both the temperature and top_p parameter, it doesn't accept both simultaneously. Previously, the dispatcher was constructing the payload with both, leading to potential errors or unexpected behavior when interacting with Claude.

This change ensures that the payload only includes temperature and top_p if the corresponding model arguments are provided. This gives users the option to use Sonnet with both parameters, and leaving top_p empty for Opus.

Example configuration

Sonnet agent

{
    disable = false,
    name = "claude-sonnet",
    provider = "anthropic",
    chat = true,
    command = true,
    model = {
        model = "claude-sonnet-4-20250514",
        temperature = 0.8,
        top_p = 1
    },
    system_prompt = prompts["default"],
}

Opus agent

{
    disable = false,
    name = "claude-opus",
    provider = "anthropic",
    chat = true,
    command = true,
    model = {
        model = "claude-opus-4-1-20250805",
        temperature = 1
    },
    system_prompt = prompts["default"],
}

@Robitx Robitx merged commit dcd5c2c into Robitx:main Aug 10, 2025
1 check failed
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.

2 participants