Why does my OpenAI agent deny access to models?

Hello everyone, I have a little problem trying to create an agent with my API key.
I’m doing this agent “github/openai/openai-voice-agent-sdk-sample” and when I run the backend and try to sent a message to the agent I receive this output in the console:
“openai.APIError: Project proj_sG7R3Zp075RBUtPkhThHg7RJ does not have access to model gpt-4o-mini-2024-07-18
INFO: connection closed”

This happens when I use model=“gpt-4o-mini”, if I change the model to gpt-3.5-turbo for example, I receive a similar output:
openai.APIError: Project proj_sG7R3Zp075RBUtPkhThHg7RJ does not have access to model gpt-3.5-turbo-0125
INFO: connection closed

Now I’ve created a simple script that shows me my available models, when I run it I get:
SyncPage[Model](data=[Model(id=‘gpt-3.5-turbo’, created=1677610602, object=‘model’, owned_by=‘openai’), Model(id=‘gpt-4.1-mini’, created=1744318173, object=‘model’, owned_by=‘system’), Model(id=‘gpt-4.1-nano-2025-04-14’, created=1744321025, object=‘model’, owned_by=‘system’), Model(id=‘gpt-4.1-nano’, created=1744321707, object=‘model’, owned_by=‘system’), Model(id=‘gpt-4.1-2025-04-14’, created=1744315746, object=‘model’, owned_by=‘system’), Model(id=‘gpt-4.1’, created=1744316542, object=‘model’, owned_by=‘system’), Model(id=‘gpt-4.1-mini-2025-04-14’, created=1744317547, object=‘model’, owned_by=‘system’)], object=‘list’)

So, I have access to a lot of models, but I don’t why I can’t use them in the agent, and I also try this:
try:
response = client.chat.completions.create(
model=“gpt-4o-mini”,
messages=[{“role”: “user”, “content”: “Hello”}]
)
print(“Access granted!”)
except Exception as e:
print(e)

I and receive as output: Access granted!
So I definitely have access to those models but I don’t know how to use it in the agent.

Does anyone how to fix it or what’s happening?