unsupported_parameterTier 1 · 70% confidence

ai-agents-unsupported-paramete-when-using-o1-preview-or-similar-models-via-azure--78d0b559

agent: ai_agents

When does this happen?

IF When using o1-preview or similar models via Azure/OpenAI, the 'stop' parameter causes a 400 error because the model does not support it.

How others solved it

THEN Remove the 'stop' parameter from the LLM call. You can monkey-patch litellm.completion to strip the 'stop' kwarg, or modify crewAI's LLM wrapper to not send stop. The code example shows monkey-patching litellm.

import litellm
original_completion = litellm.completion
def patched_completion(*args, **kwargs):
    kwargs.pop('stop', None)
    return original_completion(*args, **kwargs)
litellm.completion = patched_completion

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics