Skip to content

LISA AI Log Analyzer Failure max_output_tokens #4179

Description

Symptom

LISA's AI log analyzer fails when attempting to use Azure OpenAI chat clients due to an invalid API parameter being passed to the Azure OpenAI service.

Root Cause

The agent-framework library incorrectly translates the max_tokens parameter to max_output_tokens when calling the Azure OpenAI Chat Completions API. The parameter max_output_tokens is not supported by Azure OpenAI's AsyncCompletions.create() method, which expects either max_tokens or max_completion_tokens.

This is a known bug in the agent-framework library:

Error Message

[INFO] ala [Magentic] Attempt 1 failed: <class 'agent_framework.azure._chat_client.AzureOpenAIChatClient'> service failed to complete the prompt: AsyncCompletions.create() got an unexpected keyword argument 'max_output_tokens'

Affected Versions

  • agent-framework-core: 1.0.0b251223
  • agent-framework-azure-ai: 1.0.0b251223
  • openai: 2.8.1

Workaround

Instead of passing max_tokens directly to ChatAgent, the issue comment suggests using:

additional_properties={"max_completion_tokens": 8000}

to bypass the buggy translation in the framework and uses the correct Azure OpenAI API parameter.

Once agent-framework releases a fix, update to the fixed version and remove the workaround.

Activity

  1. added a commit that references this issue on Dec 30, 2025
    00fff9d
  2. added a commit that references this issue on Jan 5, 2026
    79ae861
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions