Finetuning a GPT4o-mini model in Azure AI Foundry, receiving 405 error

Roshan Sathaar 0 Reputation points
2025-02-21T03:45:08.57+00:00

Hi, I am trying to finetune a GPT4o-mini model in Azure AI Foundry and when I upload training files I get a 405 error. I am using the example training and validation JSONL from Microsoft https://learn.microsoft.com/en-us/azure/ai-services/openai/tutorials/fine-tune?tabs=python-new%2Ccommand-line. I have verified both training and validation files based on the python code in the link above. I have tried creating in both the UsCentral and Sweden locality but I still get the 405 error. Any help with this will be appreciated. Thank you.

Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
4,091 questions
Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
3,614 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Vinodh247 34,666 Reputation points MVP Volunteer Moderator
    2025-02-21T05:07:46.2633333+00:00

    Hi ,

    Thanks for reaching out to Microsoft Q&A.

    405 error typically indicates that the HTTP method used is not allowed for the requested resource.

    1. Verify HTTP Method: Ensure that you're using the correct HTTP method (GET, POST) as required by the API endpoint. Using an incorrect method can lead to a 405 error.

    Check Endpoint URL: Confirm that the endpoint URL you're using is correct and corresponds to the intended operation. An incorrect URL can result in method mismatches.

    Review Training File Format: Even though you've validated your training and validation files, it's essential to ensure they adhere strictly to the required JSONL format. Any deviation can cause errors during the upload process.

    1. Inspect Error Messages: In Azure AI Foundry portal, navigate to the "Data files" section. Hover over the "error" status next to your uploaded files to view detailed error messages. This can provide specific insights into what's going wrong.
    2. Check Permissions: Ensure that your account has the necessary permissions, specifically the "Cognitive Services OpenAI Contributor" role, to perform fine-tuning operations. Lack of appropriate permissions can lead to errors.

    Regional Availability: Confirm that fine-tuning for the GPT4o-mini model is supported in the regions you're working in (US Central and Sweden). Regional restrictions can affect the availability of certain features.

    Consult Documentation: Review the official Azure OpenAI fine-tuning tutorial to ensure all steps are correctly followed. This can help identify any missed configurations or prerequisites.

    Please feel free to click the 'Upvote' (Thumbs-up) button and 'Accept as Answer'. This helps the community by allowing others with similar queries to easily find the solution.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.