Skip to content

Python: Bug: response_format not supported with AzureAIInferenceChatPromptExecutionSettings #11952

Description

@ManniArora

Describe the bug
Response format is not support with AzureAIInferenceChatPromptExecutionSettings. Azure AI Inference chat completion API supports response_format but prompt execution settings do not support this.

For reference: https://github.com/Azure/azure-sdk-for-python/blob/372556c19c9ee3e3b5c1338c4be5eb287d902472/sdk/ai/azure-ai-inference/azure/ai/inference/aio/_patch.py#L142

To Reproduce
None of the below pass response_format to the underlying completions call -

response_format = JsonSchemaFormat(
            name="Recipe_JSON_Schema",
            schema=Recipe.model_json_schema(),
            description="",
            strict=True,
        )
AzureAIInferenceChatPromptExecutionSettings(
            service_id="service-id", response_format=response_format
        )
AzureAIInferenceChatPromptExecutionSettings(
            service_id="service-id", extra_parameters={"response_format": response_format}
        )

Expected behavior
Screenshots

Image

Platform

  • Language: Python
  • Source: pip package version 1.26.1
  • AI model: [e.g. OpenAI:GPT-4o-mini(2024-07-18)]
  • IDE: [e.g. Visual Studio, VS Code]
  • OS: [e.g. Windows, Mac]

Additional context
Add any other context about the problem here.

Activity

  1. added theissue type on May 7, 2025
  2. changed the title [-]Bug: response_format not supported with AzureAIInferenceChatPromptExecutionSettings[/-] [+]Python: Bug: response_format not supported with AzureAIInferenceChatPromptExecutionSettings[/+] on May 7, 2025
  3. changed the title [-]Bug: response_format not supported with AzureAIInferenceChatPromptExecutionSettings[/-] [+].Net: Bug: response_format not supported with AzureAIInferenceChatPromptExecutionSettings[/+] on May 7, 2025
  4. changed the title [-].Net: Bug: response_format not supported with AzureAIInferenceChatPromptExecutionSettings[/-] [+]Python: Bug: response_format not supported with AzureAIInferenceChatPromptExecutionSettings[/+] on May 8, 2025
  5. moonbox3 commented on May 8, 2025

    @moonbox3
    Collaborator

    ManniArora As of last month the Azure AI inference SDK didn't support response_format. Now, as you point out, they do. This is just a gap. We'll work on getting it handled.

  6. added a commit that references this issue on May 21, 2025
    c084b06
  7. moonbox3 commented on May 28, 2025

    @moonbox3
    Collaborator

    Support for this is included as of 1.32.0.

  8. added a commit that references this issue on Sep 15, 2025
    92fa7a0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

pythonPull requests for the Python Semantic Kernel

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions