Repository: promptfoo/promptfoo
Issue: Unable to invoke o1-pro
Root cause: Validation Gap

**Describe the bug**
When I invoke o1-pro with the following config, I always get error.
```yaml
prompts: prompt.txt
providers: 
### OpenAI
  - openai:responses:o1-pro:
      id: openai-o1-pro
      config:
        apiKey: 
```
Error:
```json
API error: 400 Bad Request
{"error":{"message":"Unknown parameter: 'text.format.name'.","type":"invalid_request_error","param":"text.format.name","code":"unknown_parameter"}}
```

**System information:**
{
  "version": "0.107.4",
  "platform": {
    "os": "darwin",
    "release": "24.3.0",
    "arch": "arm64",
    "nodeVersion": "v23.9.0"
  },
  "env": {},
  "configInfo": {
    "configExists": false,
    "configContent": null
  }
}



Hi @zhlmmc,

Thanks for reporting this issue! I think I see what's happening here - there's a small syntax issue in your promptfoo configuration that's causing the error. Please try defining your provider as:

```yaml
providers:
  - id: openai:responses:o1-pro
    config:
      # Add other settings as needed like your api key. You can also set it in your env as export OPENAI_API_KEY=.... or in an env block at the top of your config file `env: { OPENAI_API_KEY: ... }`
```

Notice that `openai:responses:o1-pro` should be a value for the `id` field, not a key with a colon at the end. I wrote a complete working example for o1-pro with function calling that you can try. You can run it with:

```bash
npx promptfoo@latest init --example openai-responses
cd openai-responses
npx promptfoo eval -c promptfooconfig.function-call.yaml
```

A couple of other tips:

1. Adding a YAML schema reference at the top of your config file catches syntax errors early on
   ```yaml
   # yaml-language-server: $schema=https://promptfoo.dev/config-schema.json
   ```
2. Verify that your OpenAI org has access to the o1-pro model if it's still not working (and that your key has the right permissions - I took a support call earlier today where someone did not have the right permissions on a key to invoke an api). 

Let me know if this helps or if you have any other questions!

I think something strange is happening here:
![Image](https://github.com/user-attachments/assets/447626d5-e52d-45d1-aaee-5ee635473ce6)

I'm always using the config format mention in issue description and it worked well on all other models except o1-pro. I tried to change it to the format you suggested but it reports yaml syntax error.

I checked open account and I do have the permission to call o1-pro.

> I think something strange is happening here: ![Image](https://github.com/user-attachments/assets/447626d5-e52d-45d1-aaee-5ee635473ce6)
> 
> I'm always using the config format mention in issue description and it worked well on all other models except o1-pro. I tried to change it to the format you suggested but it reports yaml syntax error.
> 
> I checked open account and I do have the permission to call o1-pro.

Oh, there is an indentation error, I fixed it 
![Image](https://github.com/user-attachments/assets/1f6d83e5-7459-4ae8-a742-8182e3b2a692)

But still get the same 400 error when running.

Hey @zhlmmc, thanks for checking that and providing the extra details. With your API key, if you run 
```curl -s https://api.openai.com/v1/models -H "Authorization: Bearer $OPENAI_API_KEY" | jq '.data[] | select(.id=="o1-pro")'``` do you get an object back with the id o1-pro? If so, feel free to put some time on my calendar: https://cal.com/michael-dangelo/15min. Happy to walk through this live and get you unstuck. 

> Hey [@zhlmmc](https://github.com/zhlmmc), thanks for checking that and providing the extra details. With your API key, if you run `curl -s https://api.openai.com/v1/models -H "Authorization: Bearer $OPENAI_API_KEY" | jq '.data[] | select(.id=="o1-pro")'` do you get an object back with the id o1-pro? If so, feel free to put some time on my calendar: https://cal.com/michael-dangelo/15min. Happy to walk through this live and get you unstuck.
```bash
curl -s https://api.openai.com/v1/models -H "Authorization: Bearer sk-proj-l8E6Fg-xx" | jq '.data[] | select(.id=="o1-pro")'
{
  "id": "o1-pro",
  "object": "model",
  "created": 1742251791,
  "owned_by": "system"
}
```
Yes, I do have o1-pro returned. Have scheduled a meeting on your calendar.

0.107.5 solves the issue