OpenHands / OpenHands/software-agent-sdk

[Bug]: When trying to create Azure based LLM API is rejected with bad request

Open
#4,549 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug llm lm-support priority:medium
Dominant language
Python
Stars
1.1k
Forks
539
Avg merge
1d 19h
Merged PRs (30d)
137

Description

Is there an existing issue for the same bug?
  • I have searched existing issues and this is not a duplicate.
Bug Description

When I try to create LLM with Azure provider, the request to Azure endpoint rejected with the following message.

litellm.BadRequestError: AzureException - {"error":{"code":"BadRequest","message":"Azure OpenAI Responses API is enabled only for api-version 2025-03-01-preview and later"}}

Expected Behavior

When I try to create LLM with Azure provider, the request should be accepted and LLM should be created without errors.

Actual Behavior

No response

Steps to Reproduce
  1. Install OpenHands and software-agent-sdk in my local desktop
  2. run OpenHands with npm run dev
  3. In the webUI, try to create the LLM with Azure provider with Azure API key
  4. Hit Save and got this error.
Acceptance Criteria
  • There should be no error happening when creating LLM with Azure provider
Installation Method

No response

If you selected "Other", please specify

No response

SDK Version

No response

Version Confirmation
  • I have confirmed this bug exists on the LATEST version of OpenHands SDK
Python Version

No response

Model Name (if applicable)

No response

Operating System

No response

Logs and Error Messages

No response

Minimal Code Sample

No response

Screenshots and Additional Context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing Azure-provider LLM creation through the OpenHands web UI and trace the request sent to the Azure endpoint. Check how the Azure API version and Responses API setting are selected; done means saving an Azure LLM succeeds without the reported BadRequestError.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, python
Domain
api, cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.