obsidian-copilot icon indicating copy to clipboard operation
obsidian-copilot copied to clipboard

PSA: Azure OpenAI invocations have changed for GPT-5

Open rcarmo opened this issue 1 month ago • 2 comments

FYI, the current Azure OpenAI URL structure for GPT-5 models has changed.

# old
https://HOSTNAME.openai.azure.com/openai/deployments/gpt-4.1/chat/completions?api-version=2025-01-01-preview
# new, for gpt-5-mini
https://HOSTNAME.openai.azure.com/openai/responses?api-version=2025-04-01-preview

The model name is now actually sent in the payload:

curl -X POST "https://$HOSTNAME.openai.azure.com/openai/responses?api-version=2025-04-01-preview" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer $AZURE_API_KEY" \
    -d '{
        "messages": [
            {
                "role": "user",
                "content": "I am going to Paris, what should I see?"
            }
        ],
        "max_completion_tokens": 16384,
        "model": "gpt-5-mini"
    }'

rcarmo avatar Nov 01 '25 12:11 rcarmo

What does it say if you try to use the old one?

ichts avatar Nov 01 '25 15:11 ichts

You can't use GPT-5 with Azure OpenAI in the current version.

rcarmo avatar Nov 02 '25 22:11 rcarmo

Try selecting provider as "OpenAI Format" in Co-Pilot, this defaults to /responses put /openai in the path not /v1

spammenotinoz avatar Dec 04 '25 02:12 spammenotinoz

Try selecting provider as "OpenAI Format" in Co-Pilot, this defaults to /responses put /openai in the path not /v1

LM Studio worked for me. I didn't drill down to see how requests are being formatted for this one.

ajeden avatar Dec 05 '25 08:12 ajeden