Skip to content

Error 404 in Roo-Code, but Replicable using openai in pythonΒ #7498

@CCranney

Description

@CCranney

App Version

v3.26.2

API Provider

OpenAI Compatible

Model Used

o3-mini

Roo Code Task Links (Optional)

Hi,

I am trying to get Roo-Code set up with my Azure API. I can successfully replicate this in Python code, but am getting a 404 error when running it through Roo-Code. I do not know if this is an error in Roo-Code specifically, or just a mistake on my end, but thought I'd reach out.

First, my Roo-Code settings (blanking out my specific Base URL and API Key):

Image

With the accompanying, fairly unexplanatory error (I see this is being addressed in #7487 )

Image

I wrote a simple Python script that uses all this same information, and successfully outputs Hello, world!.

from openai import AzureOpenAI
from pydantic import BaseModel, Field

class QueryResponse(BaseModel):
    search_query: str = Field(description="Return the desired string.")

prompt = "return the string 'Hello, world!'."

client = AzureOpenAI(api_key=API_KEYS['azure'], api_version='2025-03-01-preview', azure_endpoint=AZURE_ENDPOINT)
messages = [
    {"role": "user", "content": prompt}
]

completion = client.beta.chat.completions.parse(
    model="o3-mini",
    messages=messages,
    tools=[],
    response_format=QueryResponse
)

search_query = completion.choices[0].message.parsed.search_query
print(search_query)

I assumed that Base URL and azure_endpoint are synonymous in this instance.

I fiddled with several settings, but couldn't quite get past the 404 error. Can you see what might be going wrong with this setup? Is a 404 error expected for this particular use case?

πŸ” Steps to Reproduce

  1. This is on a Mac, running VS code version 1.103.1.
  2. Input all the settings outlined above.
  3. Start a new task.
  4. Make the prompt, "return the string 'Hello, world!'."
  5. Hit send.

At this point it would fail. For the python code, it is recommended you create your own python environment to install openai and pydantic. Afterwards, run it with the appropriate URL and API key, it works without difficulty.

πŸ’₯ Outcome Summary

Expected the string "Hello, world!" to appear, but got a 404 error instead. I have replicated the task successfully using python code.

πŸ“„ Relevant Logs or Errors (Optional)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue - Needs ScopingValid, but needs effort estimate or design input before work can start.bugSomething isn't working

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions