Skip to content

Commit e061744

Browse files
authored
chore: Test gpt-5-pro to add VCR cassette for genai-prices (#3411)
1 parent 1df9ca6 commit e061744

File tree

2 files changed

+117
-0
lines changed

2 files changed

+117
-0
lines changed
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
interactions:
2+
- request:
3+
headers:
4+
accept:
5+
- application/json
6+
accept-encoding:
7+
- gzip, deflate
8+
connection:
9+
- keep-alive
10+
content-length:
11+
- '147'
12+
content-type:
13+
- application/json
14+
host:
15+
- api.openai.com
16+
method: POST
17+
parsed_body:
18+
include:
19+
- reasoning.encrypted_content
20+
input:
21+
- content: What is the capital of Mexico?
22+
role: user
23+
model: gpt-5-pro
24+
stream: false
25+
uri: https://api.openai.com/v1/responses
26+
response:
27+
headers:
28+
alt-svc:
29+
- h3=":443"; ma=86400
30+
connection:
31+
- keep-alive
32+
content-length:
33+
- '3276'
34+
content-type:
35+
- application/json
36+
openai-organization:
37+
- pydantic-28gund
38+
openai-processing-ms:
39+
- '45869'
40+
openai-project:
41+
- proj_wlzE3wrTAwGKSsoZUKNhfDgz
42+
openai-version:
43+
- '2020-10-01'
44+
strict-transport-security:
45+
- max-age=31536000; includeSubDomains; preload
46+
transfer-encoding:
47+
- chunked
48+
parsed_body:
49+
background: false
50+
billing:
51+
payer: developer
52+
created_at: 1762973171
53+
error: null
54+
id: resp_0715fbcff7ba1d57006914d5f34eb881a384862fa55f301aa3
55+
incomplete_details: null
56+
instructions: null
57+
max_output_tokens: null
58+
max_tool_calls: null
59+
metadata: {}
60+
model: gpt-5-pro-2025-10-06
61+
object: response
62+
output:
63+
- encrypted_content: gAAAAABpFNYhYtErnkhOgG02VyB-dBDevWaCXLrq2OTPbjhEVh1ZY67Sb5wdtirUDVRsV1FIgeJGqh-3JpdTgh8pbq3FPaIMyPZBw0tks8hTxWriBtOl1PLLPhMMPWT_KBa5kVjSX_1IabEZMWnYJzJF95_ZTI1TWpouZBbZNmoYO9vm5r_B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ajBrpNaY4q2h566Mt0L8mDliNxCwsDLUys5Zk0OL66Pxs4HAVfUSARNzmmMZmNwBgtWuGNqKpp320Y_8P3BTIc_SRspSRj_9VH_RIZgd-abEpSl8n_PDS0HyhKzVyIv8hVu74lrpzst3LbH8BJWQEZLa5SI0nFXaQtlFxFB8xqSNaanIC4JyFed3YAbO_yYjLPsFED4gv1OOg4mxtcFgRH87i_pH4UenNcf54nRsrVyBE-6qn0kH7ERYVgs-3nCYFjwEFLeqeXCJxaiEX5PnNFIF8D0O1eGUtnchxNuawfdvZxPgiKF16ZTn6Fo64ubu3lXQWDd8e_t6JkKea8ta34prCdceXz5uEuFAr2UtlKmUXK1mBJ3Vw==
64+
id: rs_0715fbcff7ba1d57006914d620d27881a38e947417ca3fd85d
65+
summary: []
66+
type: reasoning
67+
- content:
68+
- annotations: []
69+
logprobs: []
70+
text: Mexico City (Ciudad de México).
71+
type: output_text
72+
id: msg_0715fbcff7ba1d57006914d620d3b481a399c51d4b50d74b67
73+
role: assistant
74+
status: completed
75+
type: message
76+
parallel_tool_calls: true
77+
previous_response_id: null
78+
prompt_cache_key: null
79+
prompt_cache_retention: null
80+
reasoning:
81+
effort: high
82+
summary: null
83+
safety_identifier: null
84+
service_tier: default
85+
status: completed
86+
store: true
87+
temperature: 1.0
88+
text:
89+
format:
90+
type: text
91+
verbosity: medium
92+
tool_choice: auto
93+
tools: []
94+
top_logprobs: 0
95+
top_p: 1.0
96+
truncation: disabled
97+
usage:
98+
input_tokens: 13
99+
input_tokens_details:
100+
cached_tokens: 0
101+
output_tokens: 77
102+
output_tokens_details:
103+
reasoning_tokens: 64
104+
total_tokens: 90
105+
user: null
106+
status:
107+
code: 200
108+
message: OK
109+
version: 1

tests/models/test_openai_responses.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1325,6 +1325,14 @@ async def test_reasoning_model_with_temperature(allow_model_requests: None, open
13251325
)
13261326

13271327

1328+
@pytest.mark.vcr()
1329+
async def test_gpt5_pro(allow_model_requests: None, openai_api_key: str):
1330+
m = OpenAIResponsesModel('gpt-5-pro', provider=OpenAIProvider(api_key=openai_api_key))
1331+
agent = Agent(m)
1332+
result = await agent.run('What is the capital of Mexico?')
1333+
assert result.output == snapshot('Mexico City (Ciudad de México).')
1334+
1335+
13281336
@pytest.mark.vcr()
13291337
async def test_tool_output(allow_model_requests: None, openai_api_key: str):
13301338
m = OpenAIResponsesModel('gpt-4o', provider=OpenAIProvider(api_key=openai_api_key))

0 commit comments

Comments
 (0)