Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 109 additions & 0 deletions tests/models/cassettes/test_openai_responses/test_gpt5_pro.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
interactions:
- request:
headers:
accept:
- application/json
accept-encoding:
- gzip, deflate
connection:
- keep-alive
content-length:
- '147'
content-type:
- application/json
host:
- api.openai.com
method: POST
parsed_body:
include:
- reasoning.encrypted_content
input:
- content: What is the capital of Mexico?
role: user
model: gpt-5-pro
stream: false
uri: https://api.openai.com/v1/responses
response:
headers:
alt-svc:
- h3=":443"; ma=86400
connection:
- keep-alive
content-length:
- '3276'
content-type:
- application/json
openai-organization:
- pydantic-28gund
openai-processing-ms:
- '45869'
openai-project:
- proj_wlzE3wrTAwGKSsoZUKNhfDgz
openai-version:
- '2020-10-01'
strict-transport-security:
- max-age=31536000; includeSubDomains; preload
transfer-encoding:
- chunked
parsed_body:
background: false
billing:
payer: developer
created_at: 1762973171
error: null
id: resp_0715fbcff7ba1d57006914d5f34eb881a384862fa55f301aa3
incomplete_details: null
instructions: null
max_output_tokens: null
max_tool_calls: null
metadata: {}
model: gpt-5-pro-2025-10-06
object: response
output:
- encrypted_content: gAAAAABpFNYhYtErnkhOgG02VyB-dBDevWaCXLrq2OTPbjhEVh1ZY67Sb5wdtirUDVRsV1FIgeJGqh-3JpdTgh8pbq3FPaIMyPZBw0tks8hTxWriBtOl1PLLPhMMPWT_KBa5kVjSX_1IabEZMWnYJzJF95_ZTI1TWpouZBbZNmoYO9vm5r_BZy3q27fHXFJ0Q1er4HEpOI3f_UXOjt9SgKBFmSvsMFfgPXplc8Y5Nr6bqT7rXkC1r2QMdsuCOwbj9wmyBy209dGC8q8O8AOXY1Jobgy26dZe7WFRUTUAajAB5TbxXAVeTCGvDBwvs15X75Bj132FgglWHCtM2lAF2uOjNU7CJD_yHR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C4JyFed3YAbO_yYjLPsFED4gv1OOg4mxtcFgRH87i_pH4UenNcf54nRsrVyBE-6qn0kH7ERYVgs-3nCYFjwEFLeqeXCJxaiEX5PnNFIF8D0O1eGUtnchxNuawfdvZxPgiKF16ZTn6Fo64ubu3lXQWDd8e_t6JkKea8ta34prCdceXz5uEuFAr2UtlKmUXK1mBJ3Vw==
id: rs_0715fbcff7ba1d57006914d620d27881a38e947417ca3fd85d
summary: []
type: reasoning
- content:
- annotations: []
logprobs: []
text: Mexico City (Ciudad de México).
type: output_text
id: msg_0715fbcff7ba1d57006914d620d3b481a399c51d4b50d74b67
role: assistant
status: completed
type: message
parallel_tool_calls: true
previous_response_id: null
prompt_cache_key: null
prompt_cache_retention: null
reasoning:
effort: high
summary: null
safety_identifier: null
service_tier: default
status: completed
store: true
temperature: 1.0
text:
format:
type: text
verbosity: medium
tool_choice: auto
tools: []
top_logprobs: 0
top_p: 1.0
truncation: disabled
usage:
input_tokens: 13
input_tokens_details:
cached_tokens: 0
output_tokens: 77
output_tokens_details:
reasoning_tokens: 64
total_tokens: 90
user: null
status:
code: 200
message: OK
version: 1
8 changes: 8 additions & 0 deletions tests/models/test_openai_responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -1325,6 +1325,14 @@ async def test_reasoning_model_with_temperature(allow_model_requests: None, open
)


@pytest.mark.vcr()
async def test_gpt5_pro(allow_model_requests: None, openai_api_key: str):
m = OpenAIResponsesModel('gpt-5-pro', provider=OpenAIProvider(api_key=openai_api_key))
agent = Agent(m)
result = await agent.run('What is the capital of Mexico?')
assert result.output == snapshot('Mexico City (Ciudad de México).')


@pytest.mark.vcr()
async def test_tool_output(allow_model_requests: None, openai_api_key: str):
m = OpenAIResponsesModel('gpt-4o', provider=OpenAIProvider(api_key=openai_api_key))
Expand Down