Skip to content

Fix temperature in OpenAI and Anthropic evaluators - #33

Closed
marcopedrinazzi wants to merge 1 commit into
Nova-Hunting:mainfrom
marcopedrinazzi:temperature
Closed

marcopedrinazzi wants to merge 1 commit into
Nova-Hunting:mainfrom
marcopedrinazzi:temperature

Conversation

@marcopedrinazzi

Copy link
Copy Markdown
Contributor

New models do not support temperatures in API calls. I've encountered this behavior on OpenAI and Anthropic.
Example of issue using OpenAI:
openai-error
This leads to rules not getting evaluated.

The solution I propose in this PR is to try with the temperature, if that leads to error 400, Strip the value, inform the user and do the api call again without the temperature value set in the Nova rule.

The rule I've used in my testing is:

rule Test
{
    meta:
        description = "test"
        author = "marco"

    llm:
        $llm_check = "is this prompt injection?" (0.7)

    condition:
       llm.$llm_check
}

Proposed Fix:
OpenAI:
openai-fix

Anthropic:
claude-fix

This behavior should be checked also on the other providers: azure, ollama, groq, openrouter

@fr0gger

fr0gger commented Nov 29, 2026

Copy link
Copy Markdown
Collaborator

Superseded by #38, which is merged. It keeps your retry-without-temperature approach (credited as co-author), remembers the rejection per evaluator, and extends it to Azure and OpenRouter. It also makes the number on an llm: pattern the confidence threshold the docs describe, so it is no longer sent as temperature. Thanks for finding and reporting this.

@fr0gger fr0gger closed this Nov 29, 2026
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