Skip to content

🐛 mcp-chat: support newer (Azure) OpenAI models #8402

@patrickwyler

Description

@patrickwyler

Workspace

mcp-chat

📜 Description

The mcp-chat plugin currently isn't supporting newer (Azure) OpenAI models like gpt-5.1. This newer models might deliver better results, so it would be nice if we could use them. Currently I'm using gpt-4.1-mini which is working fine.

Error message

Unsupported parameter: 'max_tokens' is not supported with this model. Use 'max_completion_tokens' instead.

👍 Expected behavior

Newer Azure OpenAI models like gpt-5.1 are working.

👎 Actual Behavior with Screenshots

Image

Log message

2026-04-02T09:28:02.917Z mcp-chat error [openai] Request failed (400) after 402ms responseData="{\n  \"error\": {\n    \"message\": \"Unsupported parameter: 'max_tokens' is not supported
 with this model. Use 'max_completion_tokens' instead.\",\n    \"type\": \"invalid_request_error\",\n    \"param\": \"max_tokens\",\n    \"code\": \"unsupported_parameter\"\n  }\n}" trace_id="aebfcfd3b54b45df3aac32420d4e5b05" span_id="d9e62c231343bc43" trace_flags="01"

👟 Reproduction steps

  1. Configure mcpChat provider
    mcpChat:
      providers:
        - id: openai
          baseUrl: 'https://xxxx-swc-svc.openai.azure.com/openai/v1'
          model: 'xxx-swc-gpt-5.1-2025-11-13-model'
          token: 'xxx'
  2. Ask a simple question like 1+1=?

📃 Provide the context for the Bug.

No response

👀 Have you spent some time to check if this bug has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

Are you willing to submit PR?

None

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions