diff --git a/.castiron.stats.yml b/.castiron.stats.yml index 2265fac5f2..4b8a4d7ba0 100644 --- a/.castiron.stats.yml +++ b/.castiron.stats.yml @@ -1,7 +1,7 @@ schema_version: 1 -generation_id: 0c2924ad-3d75-402c-b2a0-8ada82e1eb30 -openapi_spec_hash: 4a78b0a569e983cfa84f047eb35b7cef -openapi_transformed_spec_hash: ea8e29bb1c978d3c90da2d514cc3b195 +generation_id: 8defad98-453a-468b-8464-781e09fd2762 +openapi_spec_hash: bf74c2ea8d8af0a1b2420a9507ce4c86 +openapi_transformed_spec_hash: fd3d7f02692ebe761c69b0271e4c0335 config_hash: 98b84a99474d4d011c1aaa92435f067a -codegen_sha: 80b1fc2610ba0909f9274a594d23a6be63eb675d -codegen_hash: c6dad89cac7037b2609aacd9ab2004f3d0bb42a44bcd5862261dd9acf1c5b114 +codegen_sha: 72337d33ad3b239e57dd5963ff8e6223272acad4 +codegen_hash: 8ec58a11d0a9e1f5ac7c424a6b3371149dde4d3565d15aa6813c4bbb330adb8b diff --git a/api_reference/openapi.transformed.yml b/api_reference/openapi.transformed.yml index 71e49e3493..f66eab7448 100644 --- a/api_reference/openapi.transformed.yml +++ b/api_reference/openapi.transformed.yml @@ -837,14 +837,14 @@ paths: -H "Authorization: Bearer $OPENAI_API_KEY" \ -H "Content-Type: multipart/form-data" \ -F file="@/path/to/file/audio.mp3" \ - -F model="gpt-4o-transcribe" + -F model="gpt-transcribe" python: | from openai import OpenAI client = OpenAI() audio_file = open("speech.mp3", "rb") transcript = client.audio.transcriptions.create( - model="gpt-4o-transcribe", + model="gpt-transcribe", file=audio_file ) javascript: | @@ -856,7 +856,7 @@ paths: async function main() { const transcription = await openai.audio.transcriptions.create({ file: fs.createReadStream("audio.mp3"), - model: "gpt-4o-transcribe", + model: "gpt-transcribe", }); console.log(transcription.text); @@ -869,7 +869,7 @@ paths: string audioFilePath = "audio.mp3"; AudioClient client = new( - model: "gpt-4o-transcribe", + model: "gpt-transcribe", apiKey: Environment.GetEnvironmentVariable("OPENAI_API_KEY") ); @@ -988,7 +988,7 @@ paths: -H "Authorization: Bearer $OPENAI_API_KEY" \ -H "Content-Type: multipart/form-data" \ -F file="@/path/to/file/audio.mp3" \ - -F model="gpt-4o-mini-transcribe" \ + -F model="gpt-transcribe" \ -F stream=true python: | from openai import OpenAI @@ -997,7 +997,7 @@ paths: audio_file = open("speech.mp3", "rb") stream = client.audio.transcriptions.create( file=audio_file, - model="gpt-4o-mini-transcribe", + model="gpt-transcribe", stream=True ) @@ -1011,7 +1011,7 @@ paths: const stream = await openai.audio.transcriptions.create({ file: fs.createReadStream("audio.mp3"), - model: "gpt-4o-mini-transcribe", + model: "gpt-transcribe", stream: true, }); @@ -1019,69 +1019,69 @@ paths: console.log(event); } response: | - data: {"type":"transcript.text.delta","delta":"I","logprobs":[{"token":"I","logprob":-0.00007588794,"bytes":[73]}]} + data: {"type":"transcript.text.delta","delta":"I"} - data: {"type":"transcript.text.delta","delta":" see","logprobs":[{"token":" see","logprob":-3.1281633e-7,"bytes":[32,115,101,101]}]} + data: {"type":"transcript.text.delta","delta":" see"} - data: {"type":"transcript.text.delta","delta":" skies","logprobs":[{"token":" skies","logprob":-2.3392786e-6,"bytes":[32,115,107,105,101,115]}]} + data: {"type":"transcript.text.delta","delta":" skies"} - data: {"type":"transcript.text.delta","delta":" of","logprobs":[{"token":" of","logprob":-3.1281633e-7,"bytes":[32,111,102]}]} + data: {"type":"transcript.text.delta","delta":" of"} - data: {"type":"transcript.text.delta","delta":" blue","logprobs":[{"token":" blue","logprob":-1.0280384e-6,"bytes":[32,98,108,117,101]}]} + data: {"type":"transcript.text.delta","delta":" blue"} - data: {"type":"transcript.text.delta","delta":" and","logprobs":[{"token":" and","logprob":-0.0005108566,"bytes":[32,97,110,100]}]} + data: {"type":"transcript.text.delta","delta":" and"} - data: {"type":"transcript.text.delta","delta":" clouds","logprobs":[{"token":" clouds","logprob":-1.9361265e-7,"bytes":[32,99,108,111,117,100,115]}]} + data: {"type":"transcript.text.delta","delta":" clouds"} - data: {"type":"transcript.text.delta","delta":" of","logprobs":[{"token":" of","logprob":-1.9361265e-7,"bytes":[32,111,102]}]} + data: {"type":"transcript.text.delta","delta":" of"} - data: {"type":"transcript.text.delta","delta":" white","logprobs":[{"token":" white","logprob":-7.89631e-7,"bytes":[32,119,104,105,116,101]}]} + data: {"type":"transcript.text.delta","delta":" white"} - data: {"type":"transcript.text.delta","delta":",","logprobs":[{"token":",","logprob":-0.0014890312,"bytes":[44]}]} + data: {"type":"transcript.text.delta","delta":","} - data: {"type":"transcript.text.delta","delta":" the","logprobs":[{"token":" the","logprob":-0.0110956915,"bytes":[32,116,104,101]}]} + data: {"type":"transcript.text.delta","delta":" the"} - data: {"type":"transcript.text.delta","delta":" bright","logprobs":[{"token":" bright","logprob":0.0,"bytes":[32,98,114,105,103,104,116]}]} + data: {"type":"transcript.text.delta","delta":" bright"} - data: {"type":"transcript.text.delta","delta":" blessed","logprobs":[{"token":" blessed","logprob":-0.000045848617,"bytes":[32,98,108,101,115,115,101,100]}]} + data: {"type":"transcript.text.delta","delta":" blessed"} - data: {"type":"transcript.text.delta","delta":" days","logprobs":[{"token":" days","logprob":-0.000010802739,"bytes":[32,100,97,121,115]}]} + data: {"type":"transcript.text.delta","delta":" days"} - data: {"type":"transcript.text.delta","delta":",","logprobs":[{"token":",","logprob":-0.00001700133,"bytes":[44]}]} + data: {"type":"transcript.text.delta","delta":","} - data: {"type":"transcript.text.delta","delta":" the","logprobs":[{"token":" the","logprob":-0.0000118755715,"bytes":[32,116,104,101]}]} + data: {"type":"transcript.text.delta","delta":" the"} - data: {"type":"transcript.text.delta","delta":" dark","logprobs":[{"token":" dark","logprob":-5.5122365e-7,"bytes":[32,100,97,114,107]}]} + data: {"type":"transcript.text.delta","delta":" dark"} - data: {"type":"transcript.text.delta","delta":" sacred","logprobs":[{"token":" sacred","logprob":-5.4385737e-6,"bytes":[32,115,97,99,114,101,100]}]} + data: {"type":"transcript.text.delta","delta":" sacred"} - data: {"type":"transcript.text.delta","delta":" nights","logprobs":[{"token":" nights","logprob":-4.00813e-6,"bytes":[32,110,105,103,104,116,115]}]} + data: {"type":"transcript.text.delta","delta":" nights"} - data: {"type":"transcript.text.delta","delta":",","logprobs":[{"token":",","logprob":-0.0036910512,"bytes":[44]}]} + data: {"type":"transcript.text.delta","delta":","} - data: {"type":"transcript.text.delta","delta":" and","logprobs":[{"token":" and","logprob":-0.0031903093,"bytes":[32,97,110,100]}]} + data: {"type":"transcript.text.delta","delta":" and"} - data: {"type":"transcript.text.delta","delta":" I","logprobs":[{"token":" I","logprob":-1.504853e-6,"bytes":[32,73]}]} + data: {"type":"transcript.text.delta","delta":" I"} - data: {"type":"transcript.text.delta","delta":" think","logprobs":[{"token":" think","logprob":-4.3202e-7,"bytes":[32,116,104,105,110,107]}]} + data: {"type":"transcript.text.delta","delta":" think"} - data: {"type":"transcript.text.delta","delta":" to","logprobs":[{"token":" to","logprob":-1.9361265e-7,"bytes":[32,116,111]}]} + data: {"type":"transcript.text.delta","delta":" to"} - data: {"type":"transcript.text.delta","delta":" myself","logprobs":[{"token":" myself","logprob":-1.7432603e-6,"bytes":[32,109,121,115,101,108,102]}]} + data: {"type":"transcript.text.delta","delta":" myself"} - data: {"type":"transcript.text.delta","delta":",","logprobs":[{"token":",","logprob":-0.29254505,"bytes":[44]}]} + data: {"type":"transcript.text.delta","delta":","} - data: {"type":"transcript.text.delta","delta":" what","logprobs":[{"token":" what","logprob":-0.016815351,"bytes":[32,119,104,97,116]}]} + data: {"type":"transcript.text.delta","delta":" what"} - data: {"type":"transcript.text.delta","delta":" a","logprobs":[{"token":" a","logprob":-3.1281633e-7,"bytes":[32,97]}]} + data: {"type":"transcript.text.delta","delta":" a"} - data: {"type":"transcript.text.delta","delta":" wonderful","logprobs":[{"token":" wonderful","logprob":-2.1008714e-6,"bytes":[32,119,111,110,100,101,114,102,117,108]}]} + data: {"type":"transcript.text.delta","delta":" wonderful"} - data: {"type":"transcript.text.delta","delta":" world","logprobs":[{"token":" world","logprob":-8.180258e-6,"bytes":[32,119,111,114,108,100]}]} + data: {"type":"transcript.text.delta","delta":" world"} - data: {"type":"transcript.text.delta","delta":".","logprobs":[{"token":".","logprob":-0.014231676,"bytes":[46]}]} + data: {"type":"transcript.text.delta","delta":"."} - data: {"type":"transcript.text.done","text":"I see skies of blue and clouds of white, the bright blessed days, the dark sacred nights, and I think to myself, what a wonderful world.","logprobs":[{"token":"I","logprob":-0.00007588794,"bytes":[73]},{"token":" see","logprob":-3.1281633e-7,"bytes":[32,115,101,101]},{"token":" skies","logprob":-2.3392786e-6,"bytes":[32,115,107,105,101,115]},{"token":" of","logprob":-3.1281633e-7,"bytes":[32,111,102]},{"token":" blue","logprob":-1.0280384e-6,"bytes":[32,98,108,117,101]},{"token":" and","logprob":-0.0005108566,"bytes":[32,97,110,100]},{"token":" clouds","logprob":-1.9361265e-7,"bytes":[32,99,108,111,117,100,115]},{"token":" of","logprob":-1.9361265e-7,"bytes":[32,111,102]},{"token":" white","logprob":-7.89631e-7,"bytes":[32,119,104,105,116,101]},{"token":",","logprob":-0.0014890312,"bytes":[44]},{"token":" the","logprob":-0.0110956915,"bytes":[32,116,104,101]},{"token":" bright","logprob":0.0,"bytes":[32,98,114,105,103,104,116]},{"token":" blessed","logprob":-0.000045848617,"bytes":[32,98,108,101,115,115,101,100]},{"token":" days","logprob":-0.000010802739,"bytes":[32,100,97,121,115]},{"token":",","logprob":-0.00001700133,"bytes":[44]},{"token":" the","logprob":-0.0000118755715,"bytes":[32,116,104,101]},{"token":" dark","logprob":-5.5122365e-7,"bytes":[32,100,97,114,107]},{"token":" sacred","logprob":-5.4385737e-6,"bytes":[32,115,97,99,114,101,100]},{"token":" nights","logprob":-4.00813e-6,"bytes":[32,110,105,103,104,116,115]},{"token":",","logprob":-0.0036910512,"bytes":[44]},{"token":" and","logprob":-0.0031903093,"bytes":[32,97,110,100]},{"token":" I","logprob":-1.504853e-6,"bytes":[32,73]},{"token":" think","logprob":-4.3202e-7,"bytes":[32,116,104,105,110,107]},{"token":" to","logprob":-1.9361265e-7,"bytes":[32,116,111]},{"token":" myself","logprob":-1.7432603e-6,"bytes":[32,109,121,115,101,108,102]},{"token":",","logprob":-0.29254505,"bytes":[44]},{"token":" what","logprob":-0.016815351,"bytes":[32,119,104,97,116]},{"token":" a","logprob":-3.1281633e-7,"bytes":[32,97]},{"token":" wonderful","logprob":-2.1008714e-6,"bytes":[32,119,111,110,100,101,114,102,117,108]},{"token":" world","logprob":-8.180258e-6,"bytes":[32,119,111,114,108,100]},{"token":".","logprob":-0.014231676,"bytes":[46]}],"usage":{"input_tokens":14,"input_token_details":{"text_tokens":0,"audio_tokens":14},"output_tokens":45,"total_tokens":59}} + data: {"type":"transcript.text.done","text":"I see skies of blue and clouds of white, the bright blessed days, the dark sacred nights, and I think to myself, what a wonderful world.","languages":[{"code":"en"}],"usage":{"type":"tokens","input_tokens":14,"input_token_details":{"text_tokens":0,"audio_tokens":14},"output_tokens":45,"total_tokens":59}} - title: Logprobs request: curl: | @@ -2319,7 +2319,7 @@ paths: { "object": "chat.completion", "id": "chatcmpl-AyPNinnUqUDYo9SAdA52NobMflmj2", - "model": "gpt-6-astra", + "model": "gpt-6.2-astra", "created": 1738960610, "request_id": "req_ded8ab984ec4bf840f37566c1011c417", "tool_choice": null, @@ -2388,6 +2388,11 @@ paths: application/json: schema: $ref: '#/components/schemas/CreateChatCompletionRequest' + example: + model: gpt-6.2-astra + messages: + - role: user + content: Say hello in one sentence. responses: '200': description: | @@ -2468,7 +2473,7 @@ paths: -H "Content-Type: application/json" \ -H "Authorization: Bearer $OPENAI_API_KEY" \ -d '{ - "model": "gpt-6-astra", + "model": "gpt-6.2-astra", "messages": [ { "role": "developer", @@ -2485,7 +2490,7 @@ paths: client = OpenAI() completion = client.chat.completions.create( - model="gpt-6-astra", + model="gpt-6.2-astra", messages=[ {"role": "developer", "content": "You are a helpful assistant."}, {"role": "user", "content": "Hello!"} @@ -2501,7 +2506,7 @@ paths: async function main() { const completion = await openai.chat.completions.create({ messages: [{ role: "developer", content: "You are a helpful assistant." }], - model: "gpt-6-astra", + model: "gpt-6.2-astra", store: true, }); @@ -2516,7 +2521,7 @@ paths: using OpenAI.Chat; ChatClient client = new( - model: "gpt-6-astra", + model: "gpt-6.2-astra", apiKey: Environment.GetEnvironmentVariable("OPENAI_API_KEY") ); @@ -2534,7 +2539,7 @@ paths: "id": "chatcmpl-B9MBs8CjcvOU2jLn4n570S5qMJKcT", "object": "chat.completion", "created": 1741569952, - "model": "gpt-6-astra", + "model": "gpt-6.2-astra", "choices": [ { "index": 0, @@ -2572,7 +2577,7 @@ paths: -H "Content-Type: application/json" \ -H "Authorization: Bearer $OPENAI_API_KEY" \ -d '{ - "model": "gpt-6-astra", + "model": "gpt-6.2-astra", "messages": [ { "role": "user", @@ -2598,7 +2603,7 @@ paths: client = OpenAI() response = client.chat.completions.create( - model="gpt-6-astra", + model="gpt-6.2-astra", messages=[ { "role": "user", @@ -2624,7 +2629,7 @@ paths: async function main() { const response = await openai.chat.completions.create({ - model: "gpt-6-astra", + model: "gpt-6.2-astra", messages: [ { role: "user", @@ -2650,7 +2655,7 @@ paths: using OpenAI.Chat; ChatClient client = new( - model: "gpt-6-astra", + model: "gpt-6.2-astra", apiKey: Environment.GetEnvironmentVariable("OPENAI_API_KEY") ); @@ -2671,7 +2676,7 @@ paths: "id": "chatcmpl-B9MHDbslfkBeAs8l4bebGdFOJ6PeG", "object": "chat.completion", "created": 1741570283, - "model": "gpt-6-astra", + "model": "gpt-6.2-astra", "choices": [ { "index": 0, @@ -2709,7 +2714,7 @@ paths: -H "Content-Type: application/json" \ -H "Authorization: Bearer $OPENAI_API_KEY" \ -d '{ - "model": "gpt-6-astra", + "model": "gpt-6.2-astra", "messages": [ { "role": "developer", @@ -2727,7 +2732,7 @@ paths: client = OpenAI() completion = client.chat.completions.create( - model="gpt-6-astra", + model="gpt-6.2-astra", messages=[ {"role": "developer", "content": "You are a helpful assistant."}, {"role": "user", "content": "Hello!"} @@ -2744,7 +2749,7 @@ paths: async function main() { const completion = await openai.chat.completions.create({ - model: "gpt-6-astra", + model: "gpt-6.2-astra", messages: [ {"role": "developer", "content": "You are a helpful assistant."}, {"role": "user", "content": "Hello!"} @@ -2767,7 +2772,7 @@ paths: using OpenAI.Chat; ChatClient client = new( - model: "gpt-6-astra", + model: "gpt-6.2-astra", apiKey: Environment.GetEnvironmentVariable("OPENAI_API_KEY") ); @@ -2787,13 +2792,13 @@ paths: } } response: |+ - data: {"id":"chatcmpl-123","object":"chat.completion.chunk","created":1694268190,"model":"gpt-6-astra", "system_fingerprint": "fp_44709d6fcb", "choices":[{"index":0,"delta":{"role":"assistant","content":""},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-123","object":"chat.completion.chunk","created":1694268190,"model":"gpt-6.2-astra", "system_fingerprint": "fp_44709d6fcb", "choices":[{"index":0,"delta":{"role":"assistant","content":""},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-123","object":"chat.completion.chunk","created":1694268190,"model":"gpt-6-astra", "system_fingerprint": "fp_44709d6fcb", "choices":[{"index":0,"delta":{"content":"Hello"},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-123","object":"chat.completion.chunk","created":1694268190,"model":"gpt-6.2-astra", "system_fingerprint": "fp_44709d6fcb", "choices":[{"index":0,"delta":{"content":"Hello"},"logprobs":null,"finish_reason":null}]} : Intermediate chat completion chunks omitted. - data: {"id":"chatcmpl-123","object":"chat.completion.chunk","created":1694268190,"model":"gpt-6-astra", "system_fingerprint": "fp_44709d6fcb", "choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}]} + data: {"id":"chatcmpl-123","object":"chat.completion.chunk","created":1694268190,"model":"gpt-6.2-astra", "system_fingerprint": "fp_44709d6fcb", "choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}]} data: [DONE] @@ -2804,7 +2809,7 @@ paths: -H "Content-Type: application/json" \ -H "Authorization: Bearer $OPENAI_API_KEY" \ -d '{ - "model": "gpt-6-astra", + "model": "gpt-5.6-terra", "messages": [ { "role": "user", @@ -2834,7 +2839,8 @@ paths: } } ], - "tool_choice": "auto" + "tool_choice": "auto", + "reasoning_effort": "none" }' python: | from openai import OpenAI @@ -2862,10 +2868,11 @@ paths: ] messages = [{"role": "user", "content": "What's the weather like in Boston today?"}] completion = client.chat.completions.create( - model="gpt-6-astra", + model="gpt-5.6-terra", messages=messages, tools=tools, - tool_choice="auto" + tool_choice="auto", + reasoning_effort="none" ) print(completion) @@ -2898,10 +2905,11 @@ paths: ]; const response = await openai.chat.completions.create({ - model: "gpt-6-astra", + model: "gpt-5.6-terra", messages: messages, tools: tools, tool_choice: "auto", + reasoning_effort: "none", }); console.log(response); @@ -2915,7 +2923,7 @@ paths: using OpenAI.Chat; ChatClient client = new( - model: "gpt-6-astra", + model: "gpt-5.6-terra", apiKey: Environment.GetEnvironmentVariable("OPENAI_API_KEY") ); @@ -2952,6 +2960,7 @@ paths: getCurrentWeatherTool }, ToolChoice = ChatToolChoice.CreateAutoChoice(), + ReasoningEffortLevel = ChatReasoningEffortLevel.None, }; ChatCompletion completion = client.CompleteChat(messages, options); @@ -2960,7 +2969,7 @@ paths: "id": "chatcmpl-abc123", "object": "chat.completion", "created": 1699896916, - "model": "gpt-6-astra", + "model": "gpt-5.6-terra", "choices": [ { "index": 0, @@ -3318,7 +3327,7 @@ paths: { "object": "chat.completion", "id": "chatcmpl-abc123", - "model": "gpt-6-astra", + "model": "gpt-6.2-astra", "created": 1738960610, "request_id": "req_ded8ab984ec4bf840f37566c1011c417", "tool_choice": null, @@ -3427,7 +3436,7 @@ paths: { "object": "chat.completion", "id": "chatcmpl-AyPNinnUqUDYo9SAdA52NobMflmj2", - "model": "gpt-6-astra", + "model": "gpt-6.2-astra", "created": 1738960610, "request_id": "req_ded8ab984ec4bf840f37566c1011c417", "tool_choice": null, @@ -3719,9 +3728,7 @@ paths: object: type: string description: The object type, which is always "text_completion" - enum: - - text_completion - x-stainless-const: true + const: text_completion usage: anyOf: - $ref: '#/components/schemas/CompletionUsage' @@ -5165,7 +5172,7 @@ paths: "name": "Push Notification Summary Grader", "id": "Push Notification Summary Grader-9b876f24-4762-4be9-aff4-db7a9b31c673", "type": "label_model", - "model": "o3-mini", + "model": "gpt-4.1-mini-2025-04-14", "input": [ { "type": "message", @@ -5255,7 +5262,7 @@ paths: "testing_criteria": [ { "type": "label_model", - "model": "o3-mini", + "model": "gpt-4.1-mini-2025-04-14", "input": [ { "role": "developer", @@ -5291,7 +5298,7 @@ paths: testing_criteria=[ { "type": "label_model", - "model": "o3-mini", + "model": "gpt-4.1-mini-2025-04-14", "input": [ {"role": "developer", "content": "Classify the sentiment of the following statement as one of 'positive', 'neutral', or 'negative'"}, {"role": "user", "content": "Statement: {{item.input}}"} @@ -5317,7 +5324,7 @@ paths: testing_criteria: [ { type: "label_model", - model: "o3-mini", + model: "gpt-4.1-mini-2025-04-14", input: [ { role: "developer", content: "Classify the sentiment of the following statement as one of 'positive', 'neutral', or 'negative'" }, { role: "user", content: "Statement: {{item.input}}" } @@ -5358,7 +5365,7 @@ paths: { "name": "Example label grader", "type": "label_model", - "model": "o3-mini", + "model": "gpt-4.1-mini-2025-04-14", "input": [ { "type": "message", @@ -5793,8 +5800,8 @@ paths: "eval_id": "eval_67e0c726d560819083f19a957c4c640b", "report_url": "https://platform.openai.com/evaluations/eval_67e0c726d560819083f19a957c4c640b", "status": "completed", - "model": "o3-mini", - "name": "bulk_with_negative_examples_o3-mini", + "model": "gpt-4.1-mini-2025-04-14", + "name": "bulk_with_negative_examples_gpt-4.1-mini-2025-04-14", "created_at": 1742784467, "result_counts": { "total": 1, @@ -5804,7 +5811,7 @@ paths: }, "per_model_usage": [ { - "model_name": "o3-mini", + "model_name": "gpt-4.1-mini-2025-04-14", "invocation_count": 1, "prompt_tokens": 563, "completion_tokens": 874, @@ -5852,7 +5859,7 @@ paths: } ] }, - "model": "o3-mini" + "model": "gpt-4.1-mini-2025-04-14" }, "error": null, "metadata": {} @@ -5918,14 +5925,14 @@ paths: -X POST \ -H "Authorization: Bearer $OPENAI_API_KEY" \ -H "Content-Type: application/json" \ - -d '{"name":"gpt-6-astra","data_source":{"type":"completions","input_messages":{"type":"template","template":[{"role":"developer","content":"Categorize a given news headline into one of the following topics: Technology, Markets, World, Business, or Sports.\n\n# Steps\n\n1. Analyze the content of the news headline to understand its primary focus.\n2. Extract the subject matter, identifying any key indicators or keywords.\n3. Use the identified indicators to determine the most suitable category out of the five options: Technology, Markets, World, Business, or Sports.\n4. Ensure only one category is selected per headline.\n\n# Output Format\n\nRespond with the chosen category as a single word. For instance: \"Technology\", \"Markets\", \"World\", \"Business\", or \"Sports\".\n\n# Examples\n\n**Input**: \"Apple Unveils New iPhone Model, Featuring Advanced AI Features\" \n**Output**: \"Technology\"\n\n**Input**: \"Global Stocks Mixed as Investors Await Central Bank Decisions\" \n**Output**: \"Markets\"\n\n**Input**: \"War in Ukraine: Latest Updates on Negotiation Status\" \n**Output**: \"World\"\n\n**Input**: \"Microsoft in Talks to Acquire Gaming Company for $2 Billion\" \n**Output**: \"Business\"\n\n**Input**: \"Manchester United Secures Win in Premier League Football Match\" \n**Output**: \"Sports\" \n\n# Notes\n\n- If the headline appears to fit into more than one category, choose the most dominant theme.\n- Keywords or phrases such as \"stocks\", \"company acquisition\", \"match\", or technological brands can be good indicators for classification.\n"} , {"role":"user","content":"{{item.input}}"}]} ,"sampling_params":{"max_completions_tokens":2048},"model":"gpt-6-astra","source":{"type":"file_content","content":[{"item":{"input":"Tech Company Launches Advanced Artificial Intelligence Platform","ground_truth":"Technology"}}]}}}' + -d '{"name":"gpt-4.1-mini-2025-04-14","data_source":{"type":"completions","input_messages":{"type":"template","template":[{"role":"developer","content":"Categorize a given news headline into one of the following topics: Technology, Markets, World, Business, or Sports.\n\n# Steps\n\n1. Analyze the content of the news headline to understand its primary focus.\n2. Extract the subject matter, identifying any key indicators or keywords.\n3. Use the identified indicators to determine the most suitable category out of the five options: Technology, Markets, World, Business, or Sports.\n4. Ensure only one category is selected per headline.\n\n# Output Format\n\nRespond with the chosen category as a single word. For instance: \"Technology\", \"Markets\", \"World\", \"Business\", or \"Sports\".\n\n# Examples\n\n**Input**: \"Apple Unveils New iPhone Model, Featuring Advanced AI Features\" \n**Output**: \"Technology\"\n\n**Input**: \"Global Stocks Mixed as Investors Await Central Bank Decisions\" \n**Output**: \"Markets\"\n\n**Input**: \"War in Ukraine: Latest Updates on Negotiation Status\" \n**Output**: \"World\"\n\n**Input**: \"Microsoft in Talks to Acquire Gaming Company for $2 Billion\" \n**Output**: \"Business\"\n\n**Input**: \"Manchester United Secures Win in Premier League Football Match\" \n**Output**: \"Sports\" \n\n# Notes\n\n- If the headline appears to fit into more than one category, choose the most dominant theme.\n- Keywords or phrases such as \"stocks\", \"company acquisition\", \"match\", or technological brands can be good indicators for classification.\n"} , {"role":"user","content":"{{item.input}}"}]} ,"sampling_params":{"max_completions_tokens":2048},"model":"gpt-4.1-mini-2025-04-14","source":{"type":"file_content","content":[{"item":{"input":"Tech Company Launches Advanced Artificial Intelligence Platform","ground_truth":"Technology"}}]}}}' python: | from openai import OpenAI client = OpenAI() run = client.evals.runs.create( "eval_67e579652b548190aaa83ada4b125f47", - name="gpt-6-astra", + name="gpt-4.1-mini-2025-04-14", data_source={ "type": "completions", "input_messages": { @@ -5944,7 +5951,7 @@ paths: "sampling_params": { "max_completions_tokens": 2048 }, - "model": "gpt-6-astra", + "model": "gpt-4.1-mini-2025-04-14", "source": { "type": "file_content", "content": [ @@ -5967,7 +5974,7 @@ paths: const run = await openai.evals.runs.create( "eval_67e579652b548190aaa83ada4b125f47", { - name: "gpt-6-astra", + name: "gpt-4.1-mini-2025-04-14", data_source: { type: "completions", input_messages: { @@ -5986,7 +5993,7 @@ paths: sampling_params: { max_completions_tokens: 2048 }, - model: "gpt-6-astra", + model: "gpt-4.1-mini-2025-04-14", source: { type: "file_content", content: [ @@ -6009,8 +6016,8 @@ paths: "eval_id": "eval_67e579652b548190aaa83ada4b125f47", "report_url": "https://platform.openai.com/evaluations/eval_67e579652b548190aaa83ada4b125f47&run_id=evalrun_67e57965b480819094274e3a32235e4c", "status": "queued", - "model": "gpt-6-astra", - "name": "gpt-6-astra", + "model": "gpt-4.1-mini-2025-04-14", + "name": "gpt-4.1-mini-2025-04-14", "created_at": 1743092069, "result_counts": { "total": 0, @@ -6054,7 +6061,7 @@ paths: } ] }, - "model": "gpt-6-astra", + "model": "gpt-4.1-mini-2025-04-14", "sampling_params": { "max_completions_tokens": 2048 } @@ -6139,8 +6146,8 @@ paths: "eval_id": "eval_67abd54d9b0081909a86353f6fb9317a", "report_url": "https://platform.openai.com/evaluations/eval_67abd54d9b0081909a86353f6fb9317a?run_id=evalrun_67abd54d60ec8190832b46859da808f7", "status": "queued", - "model": "gpt-6-astra", - "name": "gpt-6-astra", + "model": "gpt-4.1-mini-2025-04-14", + "name": "gpt-4.1-mini-2025-04-14", "created_at": 1743092069, "result_counts": { "total": 0, @@ -6268,7 +6275,7 @@ paths: } ] }, - "model": "gpt-6-astra", + "model": "gpt-4.1-mini-2025-04-14", "sampling_params": { "max_completions_tokens": 2048 } @@ -6428,8 +6435,8 @@ paths: "eval_id": "eval_67abd54d9b0081909a86353f6fb9317a", "report_url": "https://platform.openai.com/evaluations/eval_67abd54d9b0081909a86353f6fb9317a?run_id=evalrun_67abd54d60ec8190832b46859da808f7", "status": "canceled", - "model": "gpt-6-astra", - "name": "gpt-6-astra", + "model": "gpt-4.1-mini-2025-04-14", + "name": "gpt-4.1-mini-2025-04-14", "created_at": 1743092069, "result_counts": { "total": 0, @@ -6557,7 +6564,7 @@ paths: } ] }, - "model": "gpt-6-astra", + "model": "gpt-4.1-mini-2025-04-14", "sampling_params": { "max_completions_tokens": 2048 } @@ -6720,7 +6727,7 @@ paths: } ], "finish_reason": "stop", - "model": "gpt-6-astra", + "model": "gpt-4.1-mini-2025-04-14", "usage": { "total_tokens": 325, "completion_tokens": 2, @@ -6867,7 +6874,7 @@ paths: } ], "finish_reason": "stop", - "model": "gpt-6-astra", + "model": "gpt-4.1-mini-2025-04-14", "usage": { "total_tokens": 325, "completion_tokens": 2, @@ -7375,7 +7382,7 @@ paths: ] } ], - "model": "gpt-5-mini", + "model": "gpt-4.1-mini-2025-04-14", "sampling_params": { "temperature": 1, "top_p": 1, @@ -7406,7 +7413,7 @@ paths: ], } ], - "model": "gpt-5-mini", + "model": "gpt-4.1-mini-2025-04-14", "sampling_params": {"temperature": 1, "top_p": 1, "seed": 42}, }, item={"reference_answer": "fuzzy wuzzy was a bear"}, @@ -7433,7 +7440,7 @@ paths: ], }, ], - model: "gpt-5-mini", + model: "gpt-4.1-mini-2025-04-14", sampling_params: { temperature: 1, top_p: 1, seed: 42 }, }, item: { reference_answer: "fuzzy wuzzy was a bear" }, @@ -7470,11 +7477,11 @@ paths: "completion_tokens": 134, "cached_tokens": 0 }, - "sampled_model_name": "gpt-5-mini" + "sampled_model_name": "gpt-4.1-mini-2025-04-14" }, "sub_rewards": {}, "model_grader_token_usage_per_model": { - "gpt-5-mini": { + "gpt-4.1-mini-2025-04-14": { "prompt_tokens": 190, "total_tokens": 324, "completion_tokens": 134, @@ -7509,7 +7516,7 @@ paths: ] } ], - "model": "gpt-5-mini", + "model": "gpt-4.1-mini-2025-04-14", "sampling_params": { "temperature": 0.2 } @@ -7693,7 +7700,7 @@ paths: examples: request: curl: | - curl https://api.openai.com/v1/fine_tuning/checkpoints/ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd/permissions \ + curl https://api.openai.com/v1/fine_tuning/checkpoints/ft:gpt-4.1-mini-2025-04-14:org:weather:B7R9VjQd/permissions \ -H "Authorization: Bearer $OPENAI_API_KEY" response: | { @@ -7731,7 +7738,7 @@ paths: required: true schema: type: string - example: ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd + example: ft:gpt-4.1-mini-2025-04-14:org:weather:B7R9VjQd description: | The ID of the fine-tuned model checkpoint to create a permission for. requestBody: @@ -7770,7 +7777,7 @@ paths: examples: request: curl: | - curl https://api.openai.com/v1/fine_tuning/checkpoints/ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd/permissions \ + curl https://api.openai.com/v1/fine_tuning/checkpoints/ft:gpt-4.1-mini-2025-04-14:org:weather:B7R9VjQd/permissions \ -H "Authorization: Bearer $OPENAI_API_KEY" -d '{"project_ids": ["proj_abGMw1llN8IrBb6SvvY5A1iH"]}' response: | @@ -7804,7 +7811,7 @@ paths: required: true schema: type: string - example: ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd + example: ft:gpt-4.1-mini-2025-04-14:org:weather:B7R9VjQd description: | The ID of the fine-tuned model checkpoint to delete a permission for. - in: path @@ -7845,7 +7852,7 @@ paths: examples: request: curl: | - curl https://api.openai.com/v1/fine_tuning/checkpoints/ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd/permissions/cp_zc4Q7MP6XxulcVzj4MZdwsAB \ + curl https://api.openai.com/v1/fine_tuning/checkpoints/ft:gpt-4.1-mini-2025-04-14:org:weather:B7R9VjQd/permissions/cp_zc4Q7MP6XxulcVzj4MZdwsAB \ -H "Authorization: Bearer $OPENAI_API_KEY" response: | { @@ -7901,7 +7908,7 @@ paths: -H "Authorization: Bearer $OPENAI_API_KEY" \ -d '{ "training_file": "file-BK7bzQj3FfZFXr7DbL6xJwfo", - "model": "gpt-4o-mini" + "model": "gpt-4.1-mini-2025-04-14" }' python: | from openai import OpenAI @@ -7909,7 +7916,7 @@ paths: client.fine_tuning.jobs.create( training_file="file-abc123", - model="gpt-4o-mini" + model="gpt-4.1-mini-2025-04-14" ) javascript: | import OpenAI from "openai"; @@ -7933,7 +7940,7 @@ paths: -H "Authorization: Bearer $OPENAI_API_KEY" \ -d '{ "training_file": "file-abc123", - "model": "gpt-4o-mini", + "model": "gpt-4.1-mini-2025-04-14", "method": { "type": "supervised", "supervised": { @@ -7951,7 +7958,7 @@ paths: client.fine_tuning.jobs.create( training_file="file-abc123", - model="gpt-4o-mini", + model="gpt-4.1-mini-2025-04-14", method={ "type": "supervised", "supervised": SupervisedMethod( @@ -7970,7 +7977,7 @@ paths: async function main() { const fineTune = await openai.fineTuning.jobs.create({ training_file: "file-abc123", - model: "gpt-4o-mini", + model: "gpt-4.1-mini-2025-04-14", method: { type: "supervised", supervised: { @@ -7994,7 +8001,7 @@ paths: -d '{ "training_file": "file-abc123", "validation_file": "file-abc123", - "model": "gpt-4o-mini", + "model": "gpt-4.1-mini-2025-04-14", "method": { "type": "dpo", "dpo": { @@ -8013,7 +8020,7 @@ paths: client.fine_tuning.jobs.create( training_file="file-abc", validation_file="file-123", - model="gpt-4o-mini", + model="gpt-4.1-mini-2025-04-14", method={ "type": "dpo", "dpo": DpoMethod( @@ -8021,7 +8028,7 @@ paths: ) } ) - - title: Reinforcement + - title: Reinforcement (historical) request: curl: | curl https://api.openai.com/v1/fine_tuning/jobs \ @@ -8047,7 +8054,34 @@ paths: } } }' - python: "from openai import OpenAI\nfrom openai.types.fine_tuning import ReinforcementMethod, ReinforcementHyperparameters\nfrom openai.types.graders import StringCheckGrader\n\nclient = OpenAI()\n\nclient.fine_tuning.jobs.create(\n training_file=\"file-abc\",\n validation_file=\"file-123\",\n model=\"o4-mini\",\n method={\n \"type\": \"reinforcement\",\n \"reinforcement\": ReinforcementMethod(\n grader=StringCheckGrader(\n name=\"Example string check grader\",\n type=\"string_check\",\n input=\"{{item.label}}\",\n operation=\"eq\",\n reference=\"{{sample.output_text}}\"\n ),\n hyperparameters=ReinforcementHyperparameters(\n reasoning_effort=\"medium\",\n )\n )\n }, \n seed=42,\n)\n" + python: | + from openai import OpenAI + from openai.types.fine_tuning import ReinforcementMethod, ReinforcementHyperparameters + from openai.types.graders import StringCheckGrader + + client = OpenAI() + + client.fine_tuning.jobs.create( + training_file="file-abc", + validation_file="file-123", + model="o4-mini", + method={ + "type": "reinforcement", + "reinforcement": ReinforcementMethod( + grader=StringCheckGrader( + name="Example string check grader", + type="string_check", + input="{{item.label}}", + operation="eq", + reference="{{sample.output_text}}" + ), + hyperparameters=ReinforcementHyperparameters( + reasoning_effort="medium", + ) + ) + }, + seed=42, + ) - title: Validation file request: curl: | @@ -8057,7 +8091,7 @@ paths: -d '{ "training_file": "file-abc123", "validation_file": "file-abc123", - "model": "gpt-4o-mini" + "model": "gpt-4.1-mini-2025-04-14" }' python: | from openai import OpenAI @@ -8066,7 +8100,7 @@ paths: client.fine_tuning.jobs.create( training_file="file-abc123", validation_file="file-def456", - model="gpt-4o-mini" + model="gpt-4.1-mini-2025-04-14" ) javascript: | import OpenAI from "openai"; @@ -8092,7 +8126,7 @@ paths: -d '{ "training_file": "file-abc123", "validation_file": "file-abc123", - "model": "gpt-4o-mini", + "model": "gpt-4.1-mini-2025-04-14", "integrations": [ { "type": "wandb", @@ -8193,7 +8227,7 @@ paths: { "object": "fine_tuning.job", "id": "ftjob-abc123", - "model": "gpt-4o-mini-2024-07-18", + "model": "gpt-4.1-mini-2025-04-14", "created_at": 1721764800, "fine_tuned_model": null, "organization_id": "org-123", @@ -8424,7 +8458,7 @@ paths: "object": "fine_tuning.job.checkpoint", "id": "ftckpt_zc4Q7MP6XxulcVzj4MZdwsAB", "created_at": 1721764867, - "fine_tuned_model_checkpoint": "ft:gpt-4o-mini-2024-07-18:my-org:custom-suffix:96olL566:ckpt-step-2000", + "fine_tuned_model_checkpoint": "ft:gpt-4.1-mini-2025-04-14:my-org:custom-suffix:96olL566:ckpt-step-2000", "metrics": { "full_valid_loss": 0.134, "full_valid_mean_token_accuracy": 0.874 @@ -8436,7 +8470,7 @@ paths: "object": "fine_tuning.job.checkpoint", "id": "ftckpt_enQCFmOTGj3syEpYVhBRLTSy", "created_at": 1721764800, - "fine_tuned_model_checkpoint": "ft:gpt-4o-mini-2024-07-18:my-org:custom-suffix:7q8mpxmy:ckpt-step-1000", + "fine_tuned_model_checkpoint": "ft:gpt-4.1-mini-2025-04-14:my-org:custom-suffix:7q8mpxmy:ckpt-step-1000", "metrics": { "full_valid_loss": 0.167, "full_valid_mean_token_accuracy": 0.781 @@ -8551,7 +8585,7 @@ paths: "id": "ft-event-tyiGuB72evQncpH87xe505Sv", "created_at": 1721764800, "level": "info", - "message": "New fine-tuned model created: ft:gpt-4o-mini:openai::7p4lURel", + "message": "New fine-tuned model created: ft:gpt-4.1-mini-2025-04-14:openai::7p4lURel", "data": null, "type": "message" } @@ -8701,6 +8735,11 @@ paths: multipart/form-data: schema: $ref: '#/components/schemas/CreateImageEditRequest' + example: + model: gpt-image-2.6-flare + prompt: Add a watercolor effect to this image + size: 1024x1024 + quality: high responses: '200': description: OK @@ -8749,7 +8788,7 @@ paths: -o >(jq -r '.data[0].b64_json' | base64 --decode > gift-basket.png) \ -X POST "https://api.openai.com/v1/images/edits" \ -H "Authorization: Bearer $OPENAI_API_KEY" \ - -F "model=gpt-image-1.5" \ + -F "model=gpt-image-2.6-flare" \ -F "image[]=@body-lotion.png" \ -F "image[]=@bath-bomb.png" \ -F "image[]=@incense-kit.png" \ @@ -8767,7 +8806,7 @@ paths: """ result = client.images.edit( - model="gpt-image-1.5", + model="gpt-image-2.6-flare", image=[ open("body-lotion.png", "rb"), open("bath-bomb.png", "rb"), @@ -8805,7 +8844,7 @@ paths: ); const rsp = await client.images.edit({ - model: "gpt-image-1.5", + model: "gpt-image-2.6-flare", image: images, prompt: "Create a lovely gift basket with these four items in it", }); @@ -8819,7 +8858,7 @@ paths: curl: | curl -s -N -X POST "https://api.openai.com/v1/images/edits" \ -H "Authorization: Bearer $OPENAI_API_KEY" \ - -F "model=gpt-image-1.5" \ + -F "model=gpt-image-2.6-flare" \ -F "image[]=@body-lotion.png" \ -F "image[]=@bath-bomb.png" \ -F "image[]=@incense-kit.png" \ @@ -8838,7 +8877,7 @@ paths: """ stream = client.images.edit( - model="gpt-image-1.5", + model="gpt-image-2.6-flare", image=[ open("body-lotion.png", "rb"), open("bath-bomb.png", "rb"), @@ -8873,7 +8912,7 @@ paths: ); const stream = await client.images.edit({ - model: "gpt-image-1.5", + model: "gpt-image-2.6-flare", image: images, prompt: "Create a lovely gift basket with these four items in it", stream: true, @@ -8902,6 +8941,9 @@ paths: application/json: schema: $ref: '#/components/schemas/CreateImageRequest' + example: + model: gpt-image-2.6-flare + prompt: A cute baby sea otter responses: '200': description: OK @@ -8950,7 +8992,7 @@ paths: -H "Content-Type: application/json" \ -H "Authorization: Bearer $OPENAI_API_KEY" \ -d '{ - "model": "gpt-image-2.5-flare", + "model": "gpt-image-2.6-flare", "prompt": "A cute baby sea otter", "n": 1, "size": "1024x1024" @@ -8961,7 +9003,7 @@ paths: client = OpenAI() img = client.images.generate( - model="gpt-image-2.5-flare", + model="gpt-image-2.6-flare", prompt="A cute baby sea otter", n=1, size="1024x1024" @@ -8977,7 +9019,7 @@ paths: const client = new OpenAI(); const img = await client.images.generate({ - model: "gpt-image-2.5-flare", + model: "gpt-image-2.6-flare", prompt: "A cute baby sea otter", n: 1, size: "1024x1024" @@ -9010,7 +9052,7 @@ paths: -H "Content-Type: application/json" \ -H "Authorization: Bearer $OPENAI_API_KEY" \ -d '{ - "model": "gpt-image-2.5-flare", + "model": "gpt-image-2.6-flare", "prompt": "A cute baby sea otter", "n": 1, "size": "1024x1024", @@ -9023,7 +9065,7 @@ paths: client = OpenAI() stream = client.images.generate( - model="gpt-image-2.5-flare", + model="gpt-image-2.6-flare", prompt="A cute baby sea otter", n=1, size="1024x1024", @@ -9038,7 +9080,7 @@ paths: const client = new OpenAI(); const stream = await client.images.generate({ - model: "gpt-image-2.5-flare", + model: "gpt-image-2.6-flare", prompt: "A cute baby sea otter", n: 1, size: "1024x1024", @@ -9610,7 +9652,7 @@ paths: required: true schema: type: string - example: gpt-6-astra + example: gpt-6.2-astra description: The ID of the model to use for this request responses: '200': @@ -9636,20 +9678,20 @@ paths: examples: request: curl: | - curl https://api.openai.com/v1/models/gpt-6-astra \ + curl https://api.openai.com/v1/models/gpt-6.2-astra \ -H "Authorization: Bearer $OPENAI_API_KEY" python: | from openai import OpenAI client = OpenAI() - client.models.retrieve("gpt-6-astra") + client.models.retrieve("gpt-6.2-astra") javascript: |- import OpenAI from "openai"; const openai = new OpenAI(); async function main() { - const model = await openai.models.retrieve("gpt-6-astra"); + const model = await openai.models.retrieve("gpt-6.2-astra"); console.log(model); } @@ -9669,7 +9711,7 @@ paths: Console.WriteLine(model.Value.Id); response: | { - "id": "gpt-6-astra", + "id": "gpt-6.2-astra", "object": "model", "created": 1686935002, "owned_by": "openai", @@ -9687,7 +9729,7 @@ paths: required: true schema: type: string - example: ft:gpt-4o-mini:acemeco:suffix:abc123 + example: ft:gpt-4.1-mini-2025-04-14:acemeco:suffix:abc123 description: The model to delete responses: '200': @@ -9713,15 +9755,15 @@ paths: examples: request: curl: | - curl https://api.openai.com/v1/models/ft:gpt-4o-mini:acemeco:suffix:abc123 \ + curl https://api.openai.com/v1/models/ft:gpt-4.1-mini-2025-04-14:acemeco:suffix:abc123 \ -X DELETE \ -H "Authorization: Bearer $OPENAI_API_KEY" python: | from openai import OpenAI client = OpenAI() - client.models.delete("ft:gpt-4o-mini:acemeco:suffix:abc123") - javascript: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const model = await openai.models.delete(\"ft:gpt-4o-mini:acemeco:suffix:abc123\");\n \n console.log(model);\n}\nmain();" + client.models.delete("ft:gpt-4.1-mini-2025-04-14:acemeco:suffix:abc123") + javascript: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const model = await openai.models.delete(\"ft:gpt-4.1-mini-2025-04-14:acemeco:suffix:abc123\");\n \n console.log(model);\n}\nmain();" csharp: | using System; using System.ClientModel; @@ -9732,11 +9774,11 @@ paths: apiKey: Environment.GetEnvironmentVariable("OPENAI_API_KEY") ); - ClientResult success = client.DeleteModel("ft:gpt-4o-mini:acemeco:suffix:abc123"); + ClientResult success = client.DeleteModel("ft:gpt-4.1-mini-2025-04-14:acemeco:suffix:abc123"); Console.WriteLine(success); response: | { - "id": "ft:gpt-4o-mini:acemeco:suffix:abc123", + "id": "ft:gpt-4.1-mini-2025-04-14:acemeco:suffix:abc123", "object": "model", "deleted": true } @@ -10229,10 +10271,8 @@ paths: example: key_abc object: type: string - enum: - - organization.admin_api_key.deleted example: organization.admin_api_key.deleted - x-stainless-const: true + const: organization.admin_api_key.deleted deleted: type: boolean example: true @@ -11037,7 +11077,7 @@ paths: type: string - name: line_items in: query - description: Return only costs for these exact line item names. Each value must match the complete `line_item` value, for example `gpt-6-astra, input_tokens`. + description: Return only costs for these exact line item names. Each value must match the complete `line_item` value, for example `gpt-6.2-astra, input_tokens`. required: false schema: type: array @@ -14158,8 +14198,8 @@ paths: "object": "project.model_permissions", "mode": "allow_list", "model_ids": [ - "gpt-6-astra", - "o3" + "gpt-6.2-astra", + "gpt-6.2-sol" ] } post: @@ -14226,7 +14266,7 @@ paths: -d '{ "mode": "deny_list", "model_ids": [ - "o3" + "gpt-6.2-sol" ] }' response: | @@ -14234,7 +14274,7 @@ paths: "object": "project.model_permissions", "mode": "deny_list", "model_ids": [ - "o3" + "gpt-6.2-sol" ] } delete: @@ -19555,7 +19595,7 @@ paths: curl -X POST https://api.openai.com/v1/realtime/calls \ -H "Authorization: Bearer $OPENAI_API_KEY" \ -F "sdp= JobsWithStreamingResponse: def create( self, *, - model: Union[str, Literal["babbage-002", "davinci-002", "gpt-3.5-turbo", "gpt-4o-mini"]], + model: Union[ + str, Literal["gpt-4.1-mini-2025-04-14", "babbage-002", "davinci-002", "gpt-3.5-turbo", "gpt-4o-mini"] + ], training_file: str, hyperparameters: job_create_params.Hyperparameters | Omit = omit, integrations: Optional[Iterable[job_create_params.Integration]] | Omit = omit, @@ -131,7 +133,7 @@ def create( name. For example, a `suffix` of "custom-model-name" would produce a model name like - `ft:gpt-4o-mini:openai:custom-model-name:7p4lURel`. + `ft:gpt-4.1-mini-2025-04-14:openai:custom-model-name:7p4lURel`. validation_file: The ID of an uploaded file that contains validation data. @@ -471,7 +473,9 @@ def with_streaming_response(self) -> AsyncJobsWithStreamingResponse: async def create( self, *, - model: Union[str, Literal["babbage-002", "davinci-002", "gpt-3.5-turbo", "gpt-4o-mini"]], + model: Union[ + str, Literal["gpt-4.1-mini-2025-04-14", "babbage-002", "davinci-002", "gpt-3.5-turbo", "gpt-4o-mini"] + ], training_file: str, hyperparameters: job_create_params.Hyperparameters | Omit = omit, integrations: Optional[Iterable[job_create_params.Integration]] | Omit = omit, @@ -541,7 +545,7 @@ async def create( name. For example, a `suffix` of "custom-model-name" would produce a model name like - `ft:gpt-4o-mini:openai:custom-model-name:7p4lURel`. + `ft:gpt-4.1-mini-2025-04-14:openai:custom-model-name:7p4lURel`. validation_file: The ID of an uploaded file that contains validation data. diff --git a/src/openai/resources/responses/responses.py b/src/openai/resources/responses/responses.py index 25cfa7dfcc..46bcbf3fbf 100644 --- a/src/openai/resources/responses/responses.py +++ b/src/openai/resources/responses/responses.py @@ -586,9 +586,9 @@ def create( Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters. - model: Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide - range of models with different capabilities, performance characteristics, and - price points. Refer to the + model: Model ID used to generate the response, like `gpt-6.2-astra`. OpenAI offers a + wide range of models with different capabilities, performance characteristics, + and price points. Refer to the [model guide](https://developers.openai.com/api/docs/models) to browse and compare available models. @@ -894,9 +894,9 @@ def create( Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters. - model: Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide - range of models with different capabilities, performance characteristics, and - price points. Refer to the + model: Model ID used to generate the response, like `gpt-6.2-astra`. OpenAI offers a + wide range of models with different capabilities, performance characteristics, + and price points. Refer to the [model guide](https://developers.openai.com/api/docs/models) to browse and compare available models. @@ -1195,9 +1195,9 @@ def create( Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters. - model: Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide - range of models with different capabilities, performance characteristics, and - price points. Refer to the + model: Model ID used to generate the response, like `gpt-6.2-astra`. OpenAI offers a + wide range of models with different capabilities, performance characteristics, + and price points. Refer to the [model guide](https://developers.openai.com/api/docs/models) to browse and compare available models. @@ -1860,6 +1860,7 @@ def compact( prompt_cache_key: Optional[str] | Omit = omit, prompt_cache_options: Optional[response_compact_params.PromptCacheOptions] | Omit = omit, prompt_cache_retention: Optional[Literal["in_memory", "24h"]] | Omit = omit, + safety_identifier: Optional[str] | Omit = omit, service_tier: Optional[Literal["auto", "default", "fast", "flex", "priority"]] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -1878,9 +1879,9 @@ def compact( [Compaction (advanced)](https://developers.openai.com/api/docs/guides/conversation-state#compaction-advanced). Args: - model: Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide - range of models with different capabilities, performance characteristics, and - price points. Refer to the + model: Model ID used to generate the response, like `gpt-6.2-astra`. OpenAI offers a + wide range of models with different capabilities, performance characteristics, + and price points. Refer to the [model guide](https://developers.openai.com/api/docs/models) to browse and compare available models. @@ -1989,6 +1990,8 @@ def compact( prompt_cache_retention: How long to retain a prompt cache entry created by this request. + safety_identifier: A stable identifier used for safety monitoring and abuse detection. + service_tier: Specifies the processing type used for serving the request. - If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'. - @@ -2027,6 +2030,7 @@ def compact( "prompt_cache_key": prompt_cache_key, "prompt_cache_options": prompt_cache_options, "prompt_cache_retention": prompt_cache_retention, + "safety_identifier": safety_identifier, }, response_compact_params.ResponseCompactParams, ), @@ -2562,9 +2566,9 @@ async def create( Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters. - model: Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide - range of models with different capabilities, performance characteristics, and - price points. Refer to the + model: Model ID used to generate the response, like `gpt-6.2-astra`. OpenAI offers a + wide range of models with different capabilities, performance characteristics, + and price points. Refer to the [model guide](https://developers.openai.com/api/docs/models) to browse and compare available models. @@ -2870,9 +2874,9 @@ async def create( Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters. - model: Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide - range of models with different capabilities, performance characteristics, and - price points. Refer to the + model: Model ID used to generate the response, like `gpt-6.2-astra`. OpenAI offers a + wide range of models with different capabilities, performance characteristics, + and price points. Refer to the [model guide](https://developers.openai.com/api/docs/models) to browse and compare available models. @@ -3171,9 +3175,9 @@ async def create( Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters. - model: Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide - range of models with different capabilities, performance characteristics, and - price points. Refer to the + model: Model ID used to generate the response, like `gpt-6.2-astra`. OpenAI offers a + wide range of models with different capabilities, performance characteristics, + and price points. Refer to the [model guide](https://developers.openai.com/api/docs/models) to browse and compare available models. @@ -3836,6 +3840,7 @@ async def compact( prompt_cache_key: Optional[str] | Omit = omit, prompt_cache_options: Optional[response_compact_params.PromptCacheOptions] | Omit = omit, prompt_cache_retention: Optional[Literal["in_memory", "24h"]] | Omit = omit, + safety_identifier: Optional[str] | Omit = omit, service_tier: Optional[Literal["auto", "default", "fast", "flex", "priority"]] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -3854,9 +3859,9 @@ async def compact( [Compaction (advanced)](https://developers.openai.com/api/docs/guides/conversation-state#compaction-advanced). Args: - model: Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide - range of models with different capabilities, performance characteristics, and - price points. Refer to the + model: Model ID used to generate the response, like `gpt-6.2-astra`. OpenAI offers a + wide range of models with different capabilities, performance characteristics, + and price points. Refer to the [model guide](https://developers.openai.com/api/docs/models) to browse and compare available models. @@ -3965,6 +3970,8 @@ async def compact( prompt_cache_retention: How long to retain a prompt cache entry created by this request. + safety_identifier: A stable identifier used for safety monitoring and abuse detection. + service_tier: Specifies the processing type used for serving the request. - If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'. - @@ -4003,6 +4010,7 @@ async def compact( "prompt_cache_key": prompt_cache_key, "prompt_cache_options": prompt_cache_options, "prompt_cache_retention": prompt_cache_retention, + "safety_identifier": safety_identifier, }, response_compact_params.ResponseCompactParams, ), diff --git a/src/openai/types/admin/organization/organization_spend_limit.py b/src/openai/types/admin/organization/organization_spend_limit.py index 3c4197b62f..7da6706563 100644 --- a/src/openai/types/admin/organization/organization_spend_limit.py +++ b/src/openai/types/admin/organization/organization_spend_limit.py @@ -1,11 +1,11 @@ # File generated from our OpenAPI spec by Castiron. See CONTRIBUTING.md for details. -from typing import Union +from typing import List, Union, Optional from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["OrganizationSpendLimit", "Enforcement"] +__all__ = ["OrganizationSpendLimit", "Enforcement", "NotificationChannel"] class Enforcement(BaseModel): @@ -15,6 +15,16 @@ class Enforcement(BaseModel): """Whether the hard spend limit is currently enforcing.""" +class NotificationChannel(BaseModel): + """Email notifications sent when the hard spend limit is reached.""" + + recipients: List[str] + + type: Literal["email"] + + subject_prefix: Optional[str] = None + + class OrganizationSpendLimit(BaseModel): """Represents a hard spend limit configured at the organization level.""" @@ -35,3 +45,6 @@ class OrganizationSpendLimit(BaseModel): threshold_amount: int """The hard spend limit amount, in cents.""" + + notification_channel: Optional[NotificationChannel] = None + """Email notifications sent when the hard spend limit is reached.""" diff --git a/src/openai/types/admin/organization/projects/project_spend_limit.py b/src/openai/types/admin/organization/projects/project_spend_limit.py index cc69598a8b..fd011bb5a6 100644 --- a/src/openai/types/admin/organization/projects/project_spend_limit.py +++ b/src/openai/types/admin/organization/projects/project_spend_limit.py @@ -1,11 +1,11 @@ # File generated from our OpenAPI spec by Castiron. See CONTRIBUTING.md for details. -from typing import Union +from typing import List, Union, Optional from typing_extensions import Literal from ....._models import BaseModel -__all__ = ["ProjectSpendLimit", "Enforcement"] +__all__ = ["ProjectSpendLimit", "Enforcement", "NotificationChannel"] class Enforcement(BaseModel): @@ -15,6 +15,16 @@ class Enforcement(BaseModel): """Whether the hard spend limit is currently enforcing.""" +class NotificationChannel(BaseModel): + """Email notifications sent when the hard spend limit is reached.""" + + recipients: List[str] + + type: Literal["email"] + + subject_prefix: Optional[str] = None + + class ProjectSpendLimit(BaseModel): """Represents a hard spend limit configured at the project level.""" @@ -35,3 +45,6 @@ class ProjectSpendLimit(BaseModel): threshold_amount: int """The hard spend limit amount, in cents.""" + + notification_channel: Optional[NotificationChannel] = None + """Email notifications sent when the hard spend limit is reached.""" diff --git a/src/openai/types/admin/organization/projects/spend_limit_update_params.py b/src/openai/types/admin/organization/projects/spend_limit_update_params.py index 826c8d5927..f7f0ccff78 100644 --- a/src/openai/types/admin/organization/projects/spend_limit_update_params.py +++ b/src/openai/types/admin/organization/projects/spend_limit_update_params.py @@ -2,9 +2,12 @@ from __future__ import annotations +from typing import Optional from typing_extensions import Literal, Required, TypedDict -__all__ = ["SpendLimitUpdateParams"] +from ....._types import SequenceNotStr + +__all__ = ["SpendLimitUpdateParams", "NotificationChannel"] class SpendLimitUpdateParams(TypedDict, total=False): @@ -19,3 +22,31 @@ class SpendLimitUpdateParams(TypedDict, total=False): threshold_amount: Required[int] """The hard spend limit amount, in cents.""" + + notification_channel: Optional[NotificationChannel] + """Configure email notifications when the spend limit is reached. + + Leave this out to keep the current settings, or send null to reset to owner-only + notifications. + """ + + +class NotificationChannel(TypedDict, total=False): + """Configure email notifications when the spend limit is reached. + + Leave this out to keep the current settings, or send null to reset to owner-only notifications. + """ + + type: Required[Literal["email"]] + + recipients: SequenceNotStr[str] + """Additional email recipients. + + Omit to keep them unchanged; send [] to clear them. + """ + + subject_prefix: Optional[str] + """Email subject prefix. + + Omit to keep it unchanged; send null or an empty string to clear it. + """ diff --git a/src/openai/types/admin/organization/spend_limit_update_params.py b/src/openai/types/admin/organization/spend_limit_update_params.py index 826c8d5927..f9a17fd947 100644 --- a/src/openai/types/admin/organization/spend_limit_update_params.py +++ b/src/openai/types/admin/organization/spend_limit_update_params.py @@ -2,9 +2,12 @@ from __future__ import annotations +from typing import Optional from typing_extensions import Literal, Required, TypedDict -__all__ = ["SpendLimitUpdateParams"] +from ...._types import SequenceNotStr + +__all__ = ["SpendLimitUpdateParams", "NotificationChannel"] class SpendLimitUpdateParams(TypedDict, total=False): @@ -19,3 +22,31 @@ class SpendLimitUpdateParams(TypedDict, total=False): threshold_amount: Required[int] """The hard spend limit amount, in cents.""" + + notification_channel: Optional[NotificationChannel] + """Configure email notifications when the spend limit is reached. + + Leave this out to keep the current settings, or send null to reset to owner-only + notifications. + """ + + +class NotificationChannel(TypedDict, total=False): + """Configure email notifications when the spend limit is reached. + + Leave this out to keep the current settings, or send null to reset to owner-only notifications. + """ + + type: Required[Literal["email"]] + + recipients: SequenceNotStr[str] + """Additional email recipients. + + Omit to keep them unchanged; send [] to clear them. + """ + + subject_prefix: Optional[str] + """Email subject prefix. + + Omit to keep it unchanged; send null or an empty string to clear it. + """ diff --git a/src/openai/types/admin/organization/usage_costs_params.py b/src/openai/types/admin/organization/usage_costs_params.py index b0ef9ad37f..46fa727c13 100644 --- a/src/openai/types/admin/organization/usage_costs_params.py +++ b/src/openai/types/admin/organization/usage_costs_params.py @@ -47,7 +47,7 @@ class UsageCostsParams(TypedDict, total=False): """Return only costs for these exact line item names. Each value must match the complete `line_item` value, for example - `gpt-6-astra, input_tokens`. + `gpt-6.2-astra, input_tokens`. """ page: str diff --git a/src/openai/types/batch.py b/src/openai/types/batch.py index ae4d0e3338..e8771a27b1 100644 --- a/src/openai/types/batch.py +++ b/src/openai/types/batch.py @@ -82,7 +82,7 @@ class Batch(BaseModel): """ model: Optional[str] = None - """Model ID used to process the batch, like `gpt-6-astra`. + """Model ID used to process the batch, like `gpt-6.2-astra`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the diff --git a/src/openai/types/beta/agents/automation_target_param.py b/src/openai/types/beta/agents/automation_target_param.py index 7b3aabd578..e8f21976be 100644 --- a/src/openai/types/beta/agents/automation_target_param.py +++ b/src/openai/types/beta/agents/automation_target_param.py @@ -104,7 +104,7 @@ class AutomationTargetParamNewSessionAgent(TypedDict, total=False): """Tools available to the agent. Omit to inherit, or pass null to clear them. The resolved tool list must fit - within 3 MiB (3,145,728 bytes) of compact UTF-8 JSON. + within 8 MiB (8,388,608 bytes) of compact UTF-8 JSON. """ diff --git a/src/openai/types/beta/agents/session_create_params.py b/src/openai/types/beta/agents/session_create_params.py index 6df9304ed8..c2bfe79150 100644 --- a/src/openai/types/beta/agents/session_create_params.py +++ b/src/openai/types/beta/agents/session_create_params.py @@ -169,7 +169,7 @@ class Agent(TypedDict, total=False): """Tools available to the agent. Omit to inherit, or pass null to clear them. The resolved tool list must fit - within 3 MiB (3,145,728 bytes) of compact UTF-8 JSON. + within 8 MiB (8,388,608 bytes) of compact UTF-8 JSON. """ diff --git a/src/openai/types/beta/beta_compacted_response.py b/src/openai/types/beta/beta_compacted_response.py index fd8919e9fc..0c2db43ce9 100644 --- a/src/openai/types/beta/beta_compacted_response.py +++ b/src/openai/types/beta/beta_compacted_response.py @@ -38,3 +38,9 @@ class BetaCompactedResponse(BaseModel): """ image: Optional[Image] = None + + safety_identifier: Optional[str] = None + """A stable identifier that was used for safety monitoring and abuse detection.""" + + service_tier: Optional[str] = None + """The service tier used for compaction, when reported.""" diff --git a/src/openai/types/beta/beta_response.py b/src/openai/types/beta/beta_response.py index a555613c99..184ffa4db5 100644 --- a/src/openai/types/beta/beta_response.py +++ b/src/openai/types/beta/beta_response.py @@ -574,7 +574,7 @@ class BetaResponse(BaseModel): ], str, ] - """Model ID used to generate the response, like `gpt-6-astra`. + """Model ID used to generate the response, like `gpt-6.2-astra`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the diff --git a/src/openai/types/beta/beta_responses_client_event.py b/src/openai/types/beta/beta_responses_client_event.py index f6224271a9..e9852ffeb1 100644 --- a/src/openai/types/beta/beta_responses_client_event.py +++ b/src/openai/types/beta/beta_responses_client_event.py @@ -526,7 +526,7 @@ class ResponseCreate(BaseModel): str, None, ] = None - """Model ID used to generate the response, like `gpt-6-astra`. + """Model ID used to generate the response, like `gpt-6.2-astra`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the diff --git a/src/openai/types/beta/beta_responses_client_event_param.py b/src/openai/types/beta/beta_responses_client_event_param.py index ad2bee42a7..21a84c9d3c 100644 --- a/src/openai/types/beta/beta_responses_client_event_param.py +++ b/src/openai/types/beta/beta_responses_client_event_param.py @@ -525,7 +525,7 @@ class ResponseCreate(TypedDict, total=False): ], str, ] - """Model ID used to generate the response, like `gpt-6-astra`. + """Model ID used to generate the response, like `gpt-6.2-astra`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the diff --git a/src/openai/types/beta/response_compact_params.py b/src/openai/types/beta/response_compact_params.py index 54615776a0..80f3414550 100644 --- a/src/openai/types/beta/response_compact_params.py +++ b/src/openai/types/beta/response_compact_params.py @@ -139,7 +139,7 @@ class ResponseCompactParams(TypedDict, total=False): None, ] ] - """Model ID used to generate the response, like `gpt-6-astra`. + """Model ID used to generate the response, like `gpt-6.2-astra`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the @@ -266,6 +266,9 @@ class ResponseCompactParams(TypedDict, total=False): prompt_cache_retention: Optional[Literal["in_memory", "24h"]] """How long to retain a prompt cache entry created by this request.""" + safety_identifier: Optional[str] + """A stable identifier used for safety monitoring and abuse detection.""" + service_tier: Optional[Literal["auto", "default", "fast", "flex", "priority"]] """Specifies the processing type used for serving the request. diff --git a/src/openai/types/beta/response_create_params.py b/src/openai/types/beta/response_create_params.py index a5eebd8ea7..09c1592982 100644 --- a/src/openai/types/beta/response_create_params.py +++ b/src/openai/types/beta/response_create_params.py @@ -266,7 +266,7 @@ class ResponseCreateParamsBase(TypedDict, total=False): ], str, ] - """Model ID used to generate the response, like `gpt-6-astra`. + """Model ID used to generate the response, like `gpt-6.2-astra`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the diff --git a/src/openai/types/chat/completion_create_params.py b/src/openai/types/chat/completion_create_params.py index 0bbeec37ba..ced322af18 100644 --- a/src/openai/types/chat/completion_create_params.py +++ b/src/openai/types/chat/completion_create_params.py @@ -51,7 +51,7 @@ class CompletionCreateParamsBase(TypedDict, total=False): """ model: Required[Union[str, ChatModel]] - """Model ID used to generate the response, like `gpt-6-astra` or `o3`. + """Model ID used to generate the response, like `gpt-6.2-astra`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the @@ -372,7 +372,7 @@ class CompletionCreateParamsBase(TypedDict, total=False): """ stop: Union[str, SequenceNotStr[str], None] - """Not supported with latest reasoning models `o3` and `o4-mini`. + """Not supported with reasoning models `o3` and `o4-mini`. Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. diff --git a/src/openai/types/completion_create_params.py b/src/openai/types/completion_create_params.py index 6695a01da2..e228f7bfbd 100644 --- a/src/openai/types/completion_create_params.py +++ b/src/openai/types/completion_create_params.py @@ -124,7 +124,7 @@ class CompletionCreateParamsBase(TypedDict, total=False): """ stop: Union[str, SequenceNotStr[str], None] - """Not supported with latest reasoning models `o3` and `o4-mini`. + """Not supported with reasoning models `o3` and `o4-mini`. Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. diff --git a/src/openai/types/conversations/conversation_create_params.py b/src/openai/types/conversations/conversation_create_params.py index 69fd6999ac..5912a5371a 100644 --- a/src/openai/types/conversations/conversation_create_params.py +++ b/src/openai/types/conversations/conversation_create_params.py @@ -27,3 +27,6 @@ class ConversationCreateParams(TypedDict, total=False): Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters. """ + + safety_identifier: Optional[str] + """A stable identifier used for safety monitoring and abuse detection.""" diff --git a/src/openai/types/eval_create_response.py b/src/openai/types/eval_create_response.py index ccc8005677..6ff8008feb 100644 --- a/src/openai/types/eval_create_response.py +++ b/src/openai/types/eval_create_response.py @@ -98,7 +98,7 @@ class EvalCreateResponse(BaseModel): Like: - Improve the quality of my chatbot - See how well my chatbot handles customer support - - Check if o4-mini is better at my usecase than gpt-6-astra + - Compare how different models perform on the same task """ id: str diff --git a/src/openai/types/eval_list_response.py b/src/openai/types/eval_list_response.py index 4730a67aee..9afb7e85e2 100644 --- a/src/openai/types/eval_list_response.py +++ b/src/openai/types/eval_list_response.py @@ -98,7 +98,7 @@ class EvalListResponse(BaseModel): Like: - Improve the quality of my chatbot - See how well my chatbot handles customer support - - Check if o4-mini is better at my usecase than gpt-6-astra + - Compare how different models perform on the same task """ id: str diff --git a/src/openai/types/eval_retrieve_response.py b/src/openai/types/eval_retrieve_response.py index 21678d06af..976a14304a 100644 --- a/src/openai/types/eval_retrieve_response.py +++ b/src/openai/types/eval_retrieve_response.py @@ -98,7 +98,7 @@ class EvalRetrieveResponse(BaseModel): Like: - Improve the quality of my chatbot - See how well my chatbot handles customer support - - Check if o4-mini is better at my usecase than gpt-6-astra + - Compare how different models perform on the same task """ id: str diff --git a/src/openai/types/eval_update_response.py b/src/openai/types/eval_update_response.py index 0771360fb0..98cc547d22 100644 --- a/src/openai/types/eval_update_response.py +++ b/src/openai/types/eval_update_response.py @@ -98,7 +98,7 @@ class EvalUpdateResponse(BaseModel): Like: - Improve the quality of my chatbot - See how well my chatbot handles customer support - - Check if o4-mini is better at my usecase than gpt-6-astra + - Compare how different models perform on the same task """ id: str diff --git a/src/openai/types/evals/create_eval_completions_run_data_source.py b/src/openai/types/evals/create_eval_completions_run_data_source.py index a7c8c3d5f1..1e7fce8602 100644 --- a/src/openai/types/evals/create_eval_completions_run_data_source.py +++ b/src/openai/types/evals/create_eval_completions_run_data_source.py @@ -84,7 +84,7 @@ class SourceStoredCompletions(BaseModel): """ model: Optional[str] = None - """An optional model to filter by (e.g., 'gpt-6-astra').""" + """An optional model to filter by (e.g., 'gpt-4.1-mini-2025-04-14').""" Source: TypeAlias = Annotated[ @@ -247,6 +247,6 @@ class CreateEvalCompletionsRunDataSource(BaseModel): """ model: Optional[str] = None - """The name of the model to use for generating completions (e.g. "o3-mini").""" + """The model to use to sample outputs with the Chat Completions API.""" sampling_params: Optional[SamplingParams] = None diff --git a/src/openai/types/evals/create_eval_completions_run_data_source_param.py b/src/openai/types/evals/create_eval_completions_run_data_source_param.py index df03508772..73ce21514b 100644 --- a/src/openai/types/evals/create_eval_completions_run_data_source_param.py +++ b/src/openai/types/evals/create_eval_completions_run_data_source_param.py @@ -84,7 +84,7 @@ class SourceStoredCompletions(TypedDict, total=False): """ model: Optional[str] - """An optional model to filter by (e.g., 'gpt-6-astra').""" + """An optional model to filter by (e.g., 'gpt-4.1-mini-2025-04-14').""" Source: TypeAlias = Union[SourceFileContent, SourceFileID, SourceStoredCompletions] @@ -243,6 +243,6 @@ class CreateEvalCompletionsRunDataSourceParam(TypedDict, total=False): """ model: str - """The name of the model to use for generating completions (e.g. "o3-mini").""" + """The model to use to sample outputs with the Chat Completions API.""" sampling_params: SamplingParams diff --git a/src/openai/types/evals/run_cancel_response.py b/src/openai/types/evals/run_cancel_response.py index 3f67ef5bda..0c3350daa7 100644 --- a/src/openai/types/evals/run_cancel_response.py +++ b/src/openai/types/evals/run_cancel_response.py @@ -330,7 +330,7 @@ class DataSourceResponses(BaseModel): """ model: Optional[str] = None - """The name of the model to use for generating completions (e.g. "o3-mini").""" + """The model to use to sample outputs with the Responses API.""" sampling_params: Optional[DataSourceResponsesSamplingParams] = None diff --git a/src/openai/types/evals/run_create_params.py b/src/openai/types/evals/run_create_params.py index 7a4da00877..c68b1a18b9 100644 --- a/src/openai/types/evals/run_create_params.py +++ b/src/openai/types/evals/run_create_params.py @@ -348,7 +348,7 @@ class DataSourceCreateEvalResponsesRunDataSource(TypedDict, total=False): """ model: str - """The name of the model to use for generating completions (e.g. "o3-mini").""" + """The model to use to sample outputs with the Responses API.""" sampling_params: DataSourceCreateEvalResponsesRunDataSourceSamplingParams diff --git a/src/openai/types/evals/run_create_response.py b/src/openai/types/evals/run_create_response.py index bafba39d27..f2ff2cda98 100644 --- a/src/openai/types/evals/run_create_response.py +++ b/src/openai/types/evals/run_create_response.py @@ -330,7 +330,7 @@ class DataSourceResponses(BaseModel): """ model: Optional[str] = None - """The name of the model to use for generating completions (e.g. "o3-mini").""" + """The model to use to sample outputs with the Responses API.""" sampling_params: Optional[DataSourceResponsesSamplingParams] = None diff --git a/src/openai/types/evals/run_list_response.py b/src/openai/types/evals/run_list_response.py index 001291590b..e681b45c51 100644 --- a/src/openai/types/evals/run_list_response.py +++ b/src/openai/types/evals/run_list_response.py @@ -330,7 +330,7 @@ class DataSourceResponses(BaseModel): """ model: Optional[str] = None - """The name of the model to use for generating completions (e.g. "o3-mini").""" + """The model to use to sample outputs with the Responses API.""" sampling_params: Optional[DataSourceResponsesSamplingParams] = None diff --git a/src/openai/types/evals/run_retrieve_response.py b/src/openai/types/evals/run_retrieve_response.py index 9ee52b3198..91800bcc9b 100644 --- a/src/openai/types/evals/run_retrieve_response.py +++ b/src/openai/types/evals/run_retrieve_response.py @@ -330,7 +330,7 @@ class DataSourceResponses(BaseModel): """ model: Optional[str] = None - """The name of the model to use for generating completions (e.g. "o3-mini").""" + """The model to use to sample outputs with the Responses API.""" sampling_params: Optional[DataSourceResponsesSamplingParams] = None diff --git a/src/openai/types/fine_tuning/job_create_params.py b/src/openai/types/fine_tuning/job_create_params.py index b0c7a4cdd5..296bd53e81 100644 --- a/src/openai/types/fine_tuning/job_create_params.py +++ b/src/openai/types/fine_tuning/job_create_params.py @@ -15,7 +15,9 @@ class JobCreateParams(TypedDict, total=False): - model: Required[Union[str, Literal["babbage-002", "davinci-002", "gpt-3.5-turbo", "gpt-4o-mini"]]] + model: Required[ + Union[str, Literal["gpt-4.1-mini-2025-04-14", "babbage-002", "davinci-002", "gpt-3.5-turbo", "gpt-4o-mini"]] + ] """The name of the model to fine-tune. You can select one of the @@ -80,7 +82,7 @@ class JobCreateParams(TypedDict, total=False): name. For example, a `suffix` of "custom-model-name" would produce a model name like - `ft:gpt-4o-mini:openai:custom-model-name:7p4lURel`. + `ft:gpt-4.1-mini-2025-04-14:openai:custom-model-name:7p4lURel`. """ validation_file: Optional[str] diff --git a/src/openai/types/live/connect_server_event.py b/src/openai/types/live/connect_server_event.py index c150cefd71..dc39f54b82 100644 --- a/src/openai/types/live/connect_server_event.py +++ b/src/openai/types/live/connect_server_event.py @@ -44,7 +44,7 @@ class SessionResumed(BaseModel): """ - Sent when speech resumes paused inference and it is ready for audio in a Live WebRTC session. Delivered to the sideband and, when permitted by its event settings, the data channel. + Sent when speech wakes inference and it is ready for audio in a Live WebRTC session. This occurs on the first wake and after each later wake. Delivered to the sideband and, when permitted by its event settings, the data channel. """ event_id: str diff --git a/src/openai/types/live/media_session_config_param.py b/src/openai/types/live/media_session_config_param.py index 92e81dadb8..dfff1ba785 100644 --- a/src/openai/types/live/media_session_config_param.py +++ b/src/openai/types/live/media_session_config_param.py @@ -99,18 +99,15 @@ class DelegationDecisions(TypedDict, total=False): class WakePolicy(TypedDict, total=False): - """Inference starts when the Live WebRTC session connects. - - After an idle pause, microphone speech resumes inference. - """ + """Starts inference when microphone speech is detected.""" type: Required[Literal["speech"]] """The wake policy type, always `speech`.""" vad_threshold: float """ - The speech detection threshold for resuming paused inference, from 0 to 1 - inclusive. Defaults to 0.5. Higher values require stronger evidence of speech. + The speech detection threshold for the first wake and each later wake, from 0 to + 1 inclusive. Defaults to 0.5. Higher values require stronger evidence of speech. This setting is independent of active turn detection. """ @@ -149,9 +146,10 @@ class MediaSessionConfigParam(TypedDict, total=False): idle_timeout_s: int """ - Whole seconds of inactivity after which a Live WebRTC session with a speech wake - policy pauses inference. The connection and conversation history are retained. - Omit to keep inference active until the session ends. + Whole seconds of inactivity after which a Live WebRTC or SIP session with a + speech wake policy pauses inference. The connection and conversation history are + retained. Omit to keep inference active after the first wake until the session + ends. """ input: Iterable[InitialItemParam] @@ -193,7 +191,4 @@ class MediaSessionConfigParam(TypedDict, total=False): """ wake_policy: WakePolicy - """Inference starts when the Live WebRTC session connects. - - After an idle pause, microphone speech resumes inference. - """ + """Starts inference when microphone speech is detected.""" diff --git a/src/openai/types/responses/compacted_response.py b/src/openai/types/responses/compacted_response.py index 05ce37afcc..5c1bfaaa2a 100644 --- a/src/openai/types/responses/compacted_response.py +++ b/src/openai/types/responses/compacted_response.py @@ -38,3 +38,9 @@ class CompactedResponse(BaseModel): """ image: Optional[Image] = None + + safety_identifier: Optional[str] = None + """A stable identifier that was used for safety monitoring and abuse detection.""" + + service_tier: Optional[str] = None + """The service tier used for compaction, when reported.""" diff --git a/src/openai/types/responses/response.py b/src/openai/types/responses/response.py index 1397746dcb..99d5159055 100644 --- a/src/openai/types/responses/response.py +++ b/src/openai/types/responses/response.py @@ -401,7 +401,7 @@ class Response(BaseModel): """ model: ResponsesModel - """Model ID used to generate the response, like `gpt-6-astra`. + """Model ID used to generate the response, like `gpt-6.2-astra`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the diff --git a/src/openai/types/responses/response_compact_params.py b/src/openai/types/responses/response_compact_params.py index c34fd560f6..643ea215c3 100644 --- a/src/openai/types/responses/response_compact_params.py +++ b/src/openai/types/responses/response_compact_params.py @@ -138,7 +138,7 @@ class ResponseCompactParams(TypedDict, total=False): None, ] ] - """Model ID used to generate the response, like `gpt-6-astra`. + """Model ID used to generate the response, like `gpt-6.2-astra`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the @@ -265,6 +265,9 @@ class ResponseCompactParams(TypedDict, total=False): prompt_cache_retention: Optional[Literal["in_memory", "24h"]] """How long to retain a prompt cache entry created by this request.""" + safety_identifier: Optional[str] + """A stable identifier used for safety monitoring and abuse detection.""" + service_tier: Optional[Literal["auto", "default", "fast", "flex", "priority"]] """Specifies the processing type used for serving the request. diff --git a/src/openai/types/responses/response_create_params.py b/src/openai/types/responses/response_create_params.py index 8f8309d0c2..7b500f27a7 100644 --- a/src/openai/types/responses/response_create_params.py +++ b/src/openai/types/responses/response_create_params.py @@ -143,7 +143,7 @@ class ResponseCreateParamsBase(TypedDict, total=False): """ model: ResponsesModel - """Model ID used to generate the response, like `gpt-6-astra`. + """Model ID used to generate the response, like `gpt-6.2-astra`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the diff --git a/src/openai/types/responses/responses_client_event.py b/src/openai/types/responses/responses_client_event.py index ec4fb50ee6..cc8555f524 100644 --- a/src/openai/types/responses/responses_client_event.py +++ b/src/openai/types/responses/responses_client_event.py @@ -343,7 +343,7 @@ class ResponseCreate(BaseModel): """ model: Optional[ResponsesModel] = None - """Model ID used to generate the response, like `gpt-6-astra`. + """Model ID used to generate the response, like `gpt-6.2-astra`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the diff --git a/src/openai/types/responses/responses_client_event_param.py b/src/openai/types/responses/responses_client_event_param.py index 2c64725bfb..ee40c3cf7e 100644 --- a/src/openai/types/responses/responses_client_event_param.py +++ b/src/openai/types/responses/responses_client_event_param.py @@ -343,7 +343,7 @@ class ResponseCreate(TypedDict, total=False): """ model: ResponsesModel - """Model ID used to generate the response, like `gpt-6-astra`. + """Model ID used to generate the response, like `gpt-6.2-astra`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the diff --git a/tests/api_resources/admin/organization/projects/test_spend_limit.py b/tests/api_resources/admin/organization/projects/test_spend_limit.py index 14d26bb2c0..06c7011811 100644 --- a/tests/api_resources/admin/organization/projects/test_spend_limit.py +++ b/tests/api_resources/admin/organization/projects/test_spend_limit.py @@ -68,6 +68,21 @@ def test_method_update(self, client: OpenAI) -> None: ) assert_matches_type(ProjectSpendLimit, spend_limit, path=["response"]) + @parametrize + def test_method_update_with_all_params(self, client: OpenAI) -> None: + spend_limit = client.admin.organization.projects.spend_limit.update( + project_id="proj_123", + currency="USD", + interval="month", + threshold_amount=1, + notification_channel={ + "type": "email", + "recipients": ["string"], + "subject_prefix": "subject_prefix", + }, + ) + assert_matches_type(ProjectSpendLimit, spend_limit, path=["response"]) + @parametrize def test_raw_response_update(self, client: OpenAI) -> None: response = client.admin.organization.projects.spend_limit.with_raw_response.update( @@ -200,6 +215,21 @@ async def test_method_update(self, async_client: AsyncOpenAI) -> None: ) assert_matches_type(ProjectSpendLimit, spend_limit, path=["response"]) + @parametrize + async def test_method_update_with_all_params(self, async_client: AsyncOpenAI) -> None: + spend_limit = await async_client.admin.organization.projects.spend_limit.update( + project_id="proj_123", + currency="USD", + interval="month", + threshold_amount=1, + notification_channel={ + "type": "email", + "recipients": ["string"], + "subject_prefix": "subject_prefix", + }, + ) + assert_matches_type(ProjectSpendLimit, spend_limit, path=["response"]) + @parametrize async def test_raw_response_update(self, async_client: AsyncOpenAI) -> None: response = await async_client.admin.organization.projects.spend_limit.with_raw_response.update( diff --git a/tests/api_resources/admin/organization/test_spend_limit.py b/tests/api_resources/admin/organization/test_spend_limit.py index 1e2667bd72..395da9510e 100644 --- a/tests/api_resources/admin/organization/test_spend_limit.py +++ b/tests/api_resources/admin/organization/test_spend_limit.py @@ -54,6 +54,20 @@ def test_method_update(self, client: OpenAI) -> None: ) assert_matches_type(OrganizationSpendLimit, spend_limit, path=["response"]) + @parametrize + def test_method_update_with_all_params(self, client: OpenAI) -> None: + spend_limit = client.admin.organization.spend_limit.update( + currency="USD", + interval="month", + threshold_amount=1, + notification_channel={ + "type": "email", + "recipients": ["string"], + "subject_prefix": "subject_prefix", + }, + ) + assert_matches_type(OrganizationSpendLimit, spend_limit, path=["response"]) + @parametrize def test_raw_response_update(self, client: OpenAI) -> None: response = client.admin.organization.spend_limit.with_raw_response.update( @@ -147,6 +161,20 @@ async def test_method_update(self, async_client: AsyncOpenAI) -> None: ) assert_matches_type(OrganizationSpendLimit, spend_limit, path=["response"]) + @parametrize + async def test_method_update_with_all_params(self, async_client: AsyncOpenAI) -> None: + spend_limit = await async_client.admin.organization.spend_limit.update( + currency="USD", + interval="month", + threshold_amount=1, + notification_channel={ + "type": "email", + "recipients": ["string"], + "subject_prefix": "subject_prefix", + }, + ) + assert_matches_type(OrganizationSpendLimit, spend_limit, path=["response"]) + @parametrize async def test_raw_response_update(self, async_client: AsyncOpenAI) -> None: response = await async_client.admin.organization.spend_limit.with_raw_response.update( diff --git a/tests/api_resources/audio/test_transcriptions.py b/tests/api_resources/audio/test_transcriptions.py index 55c634669f..93f098c319 100644 --- a/tests/api_resources/audio/test_transcriptions.py +++ b/tests/api_resources/audio/test_transcriptions.py @@ -21,7 +21,7 @@ class TestTranscriptions: def test_method_create_overload_1(self, client: OpenAI) -> None: transcription = client.audio.transcriptions.create( file=b"Example data", - model="gpt-4o-transcribe", + model="gpt-transcribe", ) assert_matches_type(TranscriptionCreateResponse, transcription, path=["response"]) @@ -29,7 +29,7 @@ def test_method_create_overload_1(self, client: OpenAI) -> None: def test_method_create_with_all_params_overload_1(self, client: OpenAI) -> None: transcription = client.audio.transcriptions.create( file=b"Example data", - model="gpt-4o-transcribe", + model="gpt-transcribe", chunking_strategy="auto", include=["logprobs"], keywords=["string"], @@ -49,7 +49,7 @@ def test_method_create_with_all_params_overload_1(self, client: OpenAI) -> None: def test_raw_response_create_overload_1(self, client: OpenAI) -> None: response = client.audio.transcriptions.with_raw_response.create( file=b"Example data", - model="gpt-4o-transcribe", + model="gpt-transcribe", ) assert response.is_closed is True @@ -61,7 +61,7 @@ def test_raw_response_create_overload_1(self, client: OpenAI) -> None: def test_streaming_response_create_overload_1(self, client: OpenAI) -> None: with client.audio.transcriptions.with_streaming_response.create( file=b"Example data", - model="gpt-4o-transcribe", + model="gpt-transcribe", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -75,7 +75,7 @@ def test_streaming_response_create_overload_1(self, client: OpenAI) -> None: def test_method_create_overload_2(self, client: OpenAI) -> None: transcription_stream = client.audio.transcriptions.create( file=b"Example data", - model="gpt-4o-transcribe", + model="gpt-transcribe", stream=True, ) transcription_stream.response.close() @@ -84,7 +84,7 @@ def test_method_create_overload_2(self, client: OpenAI) -> None: def test_method_create_with_all_params_overload_2(self, client: OpenAI) -> None: transcription_stream = client.audio.transcriptions.create( file=b"Example data", - model="gpt-4o-transcribe", + model="gpt-transcribe", stream=True, chunking_strategy="auto", include=["logprobs"], @@ -104,7 +104,7 @@ def test_method_create_with_all_params_overload_2(self, client: OpenAI) -> None: def test_raw_response_create_overload_2(self, client: OpenAI) -> None: response = client.audio.transcriptions.with_raw_response.create( file=b"Example data", - model="gpt-4o-transcribe", + model="gpt-transcribe", stream=True, ) @@ -117,7 +117,7 @@ def test_raw_response_create_overload_2(self, client: OpenAI) -> None: def test_streaming_response_create_overload_2(self, client: OpenAI) -> None: with client.audio.transcriptions.with_streaming_response.create( file=b"Example data", - model="gpt-4o-transcribe", + model="gpt-transcribe", stream=True, ) as response: assert not response.is_closed @@ -139,7 +139,7 @@ class TestAsyncTranscriptions: async def test_method_create_overload_1(self, async_client: AsyncOpenAI) -> None: transcription = await async_client.audio.transcriptions.create( file=b"Example data", - model="gpt-4o-transcribe", + model="gpt-transcribe", ) assert_matches_type(TranscriptionCreateResponse, transcription, path=["response"]) @@ -147,7 +147,7 @@ async def test_method_create_overload_1(self, async_client: AsyncOpenAI) -> None async def test_method_create_with_all_params_overload_1(self, async_client: AsyncOpenAI) -> None: transcription = await async_client.audio.transcriptions.create( file=b"Example data", - model="gpt-4o-transcribe", + model="gpt-transcribe", chunking_strategy="auto", include=["logprobs"], keywords=["string"], @@ -167,7 +167,7 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn async def test_raw_response_create_overload_1(self, async_client: AsyncOpenAI) -> None: response = await async_client.audio.transcriptions.with_raw_response.create( file=b"Example data", - model="gpt-4o-transcribe", + model="gpt-transcribe", ) assert response.is_closed is True @@ -179,7 +179,7 @@ async def test_raw_response_create_overload_1(self, async_client: AsyncOpenAI) - async def test_streaming_response_create_overload_1(self, async_client: AsyncOpenAI) -> None: async with async_client.audio.transcriptions.with_streaming_response.create( file=b"Example data", - model="gpt-4o-transcribe", + model="gpt-transcribe", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -193,7 +193,7 @@ async def test_streaming_response_create_overload_1(self, async_client: AsyncOpe async def test_method_create_overload_2(self, async_client: AsyncOpenAI) -> None: transcription_stream = await async_client.audio.transcriptions.create( file=b"Example data", - model="gpt-4o-transcribe", + model="gpt-transcribe", stream=True, ) await transcription_stream.response.aclose() @@ -202,7 +202,7 @@ async def test_method_create_overload_2(self, async_client: AsyncOpenAI) -> None async def test_method_create_with_all_params_overload_2(self, async_client: AsyncOpenAI) -> None: transcription_stream = await async_client.audio.transcriptions.create( file=b"Example data", - model="gpt-4o-transcribe", + model="gpt-transcribe", stream=True, chunking_strategy="auto", include=["logprobs"], @@ -222,7 +222,7 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn async def test_raw_response_create_overload_2(self, async_client: AsyncOpenAI) -> None: response = await async_client.audio.transcriptions.with_raw_response.create( file=b"Example data", - model="gpt-4o-transcribe", + model="gpt-transcribe", stream=True, ) @@ -235,7 +235,7 @@ async def test_raw_response_create_overload_2(self, async_client: AsyncOpenAI) - async def test_streaming_response_create_overload_2(self, async_client: AsyncOpenAI) -> None: async with async_client.audio.transcriptions.with_streaming_response.create( file=b"Example data", - model="gpt-4o-transcribe", + model="gpt-transcribe", stream=True, ) as response: assert not response.is_closed diff --git a/tests/api_resources/beta/agents/vaults/test_credentials.py b/tests/api_resources/beta/agents/vaults/test_credentials.py index b66c9f08d6..ff18cc2e5c 100644 --- a/tests/api_resources/beta/agents/vaults/test_credentials.py +++ b/tests/api_resources/beta/agents/vaults/test_credentials.py @@ -180,7 +180,7 @@ def test_method_update_with_all_params(self, client: OpenAI) -> None: }, }, }, - metadata={}, + metadata={"environment": "staging"}, ) assert_matches_type(Credential, credential, path=["response"]) @@ -487,7 +487,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncOpenAI) -> }, }, }, - metadata={}, + metadata={"environment": "staging"}, ) assert_matches_type(Credential, credential, path=["response"]) diff --git a/tests/api_resources/beta/test_responses.py b/tests/api_resources/beta/test_responses.py index 3432f3888a..5298d0d979 100644 --- a/tests/api_resources/beta/test_responses.py +++ b/tests/api_resources/beta/test_responses.py @@ -43,12 +43,12 @@ def test_method_create_with_all_params_overload_1(self, client: OpenAI) -> None: conversation="string", image={"context_compression": "auto"}, include=["file_search_call.results"], - input="string", + input="Write a one-sentence bedtime story about a unicorn.", instructions="instructions", max_output_tokens=16, max_tool_calls=0, metadata={"foo": "string"}, - model="gpt-6-astra", + model="gpt-6.2-astra", moderation={ "model": "model", "policy": { @@ -160,12 +160,12 @@ def test_method_create_with_all_params_overload_2(self, client: OpenAI) -> None: conversation="string", image={"context_compression": "auto"}, include=["file_search_call.results"], - input="string", + input="Write a one-sentence bedtime story about a unicorn.", instructions="instructions", max_output_tokens=16, max_tool_calls=0, metadata={"foo": "string"}, - model="gpt-6-astra", + model="gpt-6.2-astra", moderation={ "model": "model", "policy": { @@ -473,6 +473,7 @@ def test_method_compact_with_all_params(self, client: OpenAI) -> None: "ttl": "30m", }, prompt_cache_retention="in_memory", + safety_identifier="safety_identifier", service_tier="auto", betas=["responses_multi_agent=v1"], ) @@ -531,12 +532,12 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn conversation="string", image={"context_compression": "auto"}, include=["file_search_call.results"], - input="string", + input="Write a one-sentence bedtime story about a unicorn.", instructions="instructions", max_output_tokens=16, max_tool_calls=0, metadata={"foo": "string"}, - model="gpt-6-astra", + model="gpt-6.2-astra", moderation={ "model": "model", "policy": { @@ -648,12 +649,12 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn conversation="string", image={"context_compression": "auto"}, include=["file_search_call.results"], - input="string", + input="Write a one-sentence bedtime story about a unicorn.", instructions="instructions", max_output_tokens=16, max_tool_calls=0, metadata={"foo": "string"}, - model="gpt-6-astra", + model="gpt-6.2-astra", moderation={ "model": "model", "policy": { @@ -961,6 +962,7 @@ async def test_method_compact_with_all_params(self, async_client: AsyncOpenAI) - "ttl": "30m", }, prompt_cache_retention="in_memory", + safety_identifier="safety_identifier", service_tier="auto", betas=["responses_multi_agent=v1"], ) diff --git a/tests/api_resources/chat/test_completions.py b/tests/api_resources/chat/test_completions.py index 2e462a8e5c..dc1465e9b6 100644 --- a/tests/api_resources/chat/test_completions.py +++ b/tests/api_resources/chat/test_completions.py @@ -24,13 +24,13 @@ class TestCompletions: @parametrize def test_method_create_overload_1(self, client: OpenAI) -> None: completion = client.chat.completions.create( + model="gpt-6.2-astra", messages=[ { - "content": "string", - "role": "developer", + "content": "Say hello in one sentence.", + "role": "user", } ], - model="gpt-6-astra", ) assert_matches_type(ChatCompletion, completion, path=["response"]) @@ -39,12 +39,12 @@ def test_method_create_with_all_params_overload_1(self, client: OpenAI) -> None: completion = client.chat.completions.create( messages=[ { - "content": "string", - "role": "developer", + "content": "Say hello in one sentence.", + "role": "user", "name": "name", } ], - model="gpt-6-astra", + model="gpt-6.2-astra", audio={ "format": "wav", "voice": "alloy", @@ -131,13 +131,13 @@ def test_method_create_with_all_params_overload_1(self, client: OpenAI) -> None: @parametrize def test_raw_response_create_overload_1(self, client: OpenAI) -> None: response = client.chat.completions.with_raw_response.create( + model="gpt-6.2-astra", messages=[ { - "content": "string", - "role": "developer", + "content": "Say hello in one sentence.", + "role": "user", } ], - model="gpt-6-astra", ) assert response.is_closed is True @@ -148,13 +148,13 @@ def test_raw_response_create_overload_1(self, client: OpenAI) -> None: @parametrize def test_streaming_response_create_overload_1(self, client: OpenAI) -> None: with client.chat.completions.with_streaming_response.create( + model="gpt-6.2-astra", messages=[ { - "content": "string", - "role": "developer", + "content": "Say hello in one sentence.", + "role": "user", } ], - model="gpt-6-astra", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -167,13 +167,13 @@ def test_streaming_response_create_overload_1(self, client: OpenAI) -> None: @parametrize def test_method_create_overload_2(self, client: OpenAI) -> None: completion_stream = client.chat.completions.create( + model="gpt-6.2-astra", messages=[ { - "content": "string", - "role": "developer", + "content": "Say hello in one sentence.", + "role": "user", } ], - model="gpt-6-astra", stream=True, ) completion_stream.response.close() @@ -181,14 +181,14 @@ def test_method_create_overload_2(self, client: OpenAI) -> None: @parametrize def test_method_create_with_all_params_overload_2(self, client: OpenAI) -> None: completion_stream = client.chat.completions.create( + model="gpt-6.2-astra", messages=[ { - "content": "string", - "role": "developer", + "content": "Say hello in one sentence.", + "role": "user", "name": "name", } ], - model="gpt-6-astra", stream=True, audio={ "format": "wav", @@ -275,13 +275,13 @@ def test_method_create_with_all_params_overload_2(self, client: OpenAI) -> None: @parametrize def test_raw_response_create_overload_2(self, client: OpenAI) -> None: response = client.chat.completions.with_raw_response.create( + model="gpt-6.2-astra", messages=[ { - "content": "string", - "role": "developer", + "content": "Say hello in one sentence.", + "role": "user", } ], - model="gpt-6-astra", stream=True, ) @@ -293,13 +293,13 @@ def test_raw_response_create_overload_2(self, client: OpenAI) -> None: @parametrize def test_streaming_response_create_overload_2(self, client: OpenAI) -> None: with client.chat.completions.with_streaming_response.create( + model="gpt-6.2-astra", messages=[ { - "content": "string", - "role": "developer", + "content": "Say hello in one sentence.", + "role": "user", } ], - model="gpt-6-astra", stream=True, ) as response: assert not response.is_closed @@ -474,13 +474,13 @@ class TestAsyncCompletions: @parametrize async def test_method_create_overload_1(self, async_client: AsyncOpenAI) -> None: completion = await async_client.chat.completions.create( + model="gpt-6.2-astra", messages=[ { - "content": "string", - "role": "developer", + "content": "Say hello in one sentence.", + "role": "user", } ], - model="gpt-6-astra", ) assert_matches_type(ChatCompletion, completion, path=["response"]) @@ -489,12 +489,12 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn completion = await async_client.chat.completions.create( messages=[ { - "content": "string", - "role": "developer", + "content": "Say hello in one sentence.", + "role": "user", "name": "name", } ], - model="gpt-6-astra", + model="gpt-6.2-astra", audio={ "format": "wav", "voice": "alloy", @@ -581,13 +581,13 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn @parametrize async def test_raw_response_create_overload_1(self, async_client: AsyncOpenAI) -> None: response = await async_client.chat.completions.with_raw_response.create( + model="gpt-6.2-astra", messages=[ { - "content": "string", - "role": "developer", + "content": "Say hello in one sentence.", + "role": "user", } ], - model="gpt-6-astra", ) assert response.is_closed is True @@ -598,13 +598,13 @@ async def test_raw_response_create_overload_1(self, async_client: AsyncOpenAI) - @parametrize async def test_streaming_response_create_overload_1(self, async_client: AsyncOpenAI) -> None: async with async_client.chat.completions.with_streaming_response.create( + model="gpt-6.2-astra", messages=[ { - "content": "string", - "role": "developer", + "content": "Say hello in one sentence.", + "role": "user", } ], - model="gpt-6-astra", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -617,13 +617,13 @@ async def test_streaming_response_create_overload_1(self, async_client: AsyncOpe @parametrize async def test_method_create_overload_2(self, async_client: AsyncOpenAI) -> None: completion_stream = await async_client.chat.completions.create( + model="gpt-6.2-astra", messages=[ { - "content": "string", - "role": "developer", + "content": "Say hello in one sentence.", + "role": "user", } ], - model="gpt-6-astra", stream=True, ) await completion_stream.response.aclose() @@ -631,14 +631,14 @@ async def test_method_create_overload_2(self, async_client: AsyncOpenAI) -> None @parametrize async def test_method_create_with_all_params_overload_2(self, async_client: AsyncOpenAI) -> None: completion_stream = await async_client.chat.completions.create( + model="gpt-6.2-astra", messages=[ { - "content": "string", - "role": "developer", + "content": "Say hello in one sentence.", + "role": "user", "name": "name", } ], - model="gpt-6-astra", stream=True, audio={ "format": "wav", @@ -725,13 +725,13 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn @parametrize async def test_raw_response_create_overload_2(self, async_client: AsyncOpenAI) -> None: response = await async_client.chat.completions.with_raw_response.create( + model="gpt-6.2-astra", messages=[ { - "content": "string", - "role": "developer", + "content": "Say hello in one sentence.", + "role": "user", } ], - model="gpt-6-astra", stream=True, ) @@ -743,13 +743,13 @@ async def test_raw_response_create_overload_2(self, async_client: AsyncOpenAI) - @parametrize async def test_streaming_response_create_overload_2(self, async_client: AsyncOpenAI) -> None: async with async_client.chat.completions.with_streaming_response.create( + model="gpt-6.2-astra", messages=[ { - "content": "string", - "role": "developer", + "content": "Say hello in one sentence.", + "role": "user", } ], - model="gpt-6-astra", stream=True, ) as response: assert not response.is_closed diff --git a/tests/api_resources/fine_tuning/checkpoints/test_permissions.py b/tests/api_resources/fine_tuning/checkpoints/test_permissions.py index f44643de35..8a317fb26e 100644 --- a/tests/api_resources/fine_tuning/checkpoints/test_permissions.py +++ b/tests/api_resources/fine_tuning/checkpoints/test_permissions.py @@ -26,7 +26,7 @@ class TestPermissions: @parametrize def test_method_create(self, client: OpenAI) -> None: permission = client.fine_tuning.checkpoints.permissions.create( - fine_tuned_model_checkpoint="ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd", + fine_tuned_model_checkpoint="ft:gpt-4.1-mini-2025-04-14:org:weather:B7R9VjQd", project_ids=["string"], ) assert_matches_type(SyncPage[PermissionCreateResponse], permission, path=["response"]) @@ -34,7 +34,7 @@ def test_method_create(self, client: OpenAI) -> None: @parametrize def test_raw_response_create(self, client: OpenAI) -> None: response = client.fine_tuning.checkpoints.permissions.with_raw_response.create( - fine_tuned_model_checkpoint="ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd", + fine_tuned_model_checkpoint="ft:gpt-4.1-mini-2025-04-14:org:weather:B7R9VjQd", project_ids=["string"], ) @@ -46,7 +46,7 @@ def test_raw_response_create(self, client: OpenAI) -> None: @parametrize def test_streaming_response_create(self, client: OpenAI) -> None: with client.fine_tuning.checkpoints.permissions.with_streaming_response.create( - fine_tuned_model_checkpoint="ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd", + fine_tuned_model_checkpoint="ft:gpt-4.1-mini-2025-04-14:org:weather:B7R9VjQd", project_ids=["string"], ) as response: assert not response.is_closed @@ -180,7 +180,7 @@ def test_path_params_list(self, client: OpenAI) -> None: def test_method_delete(self, client: OpenAI) -> None: permission = client.fine_tuning.checkpoints.permissions.delete( permission_id="cp_zc4Q7MP6XxulcVzj4MZdwsAB", - fine_tuned_model_checkpoint="ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd", + fine_tuned_model_checkpoint="ft:gpt-4.1-mini-2025-04-14:org:weather:B7R9VjQd", ) assert_matches_type(PermissionDeleteResponse, permission, path=["response"]) @@ -188,7 +188,7 @@ def test_method_delete(self, client: OpenAI) -> None: def test_raw_response_delete(self, client: OpenAI) -> None: response = client.fine_tuning.checkpoints.permissions.with_raw_response.delete( permission_id="cp_zc4Q7MP6XxulcVzj4MZdwsAB", - fine_tuned_model_checkpoint="ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd", + fine_tuned_model_checkpoint="ft:gpt-4.1-mini-2025-04-14:org:weather:B7R9VjQd", ) assert response.is_closed is True @@ -200,7 +200,7 @@ def test_raw_response_delete(self, client: OpenAI) -> None: def test_streaming_response_delete(self, client: OpenAI) -> None: with client.fine_tuning.checkpoints.permissions.with_streaming_response.delete( permission_id="cp_zc4Q7MP6XxulcVzj4MZdwsAB", - fine_tuned_model_checkpoint="ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd", + fine_tuned_model_checkpoint="ft:gpt-4.1-mini-2025-04-14:org:weather:B7R9VjQd", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -223,7 +223,7 @@ def test_path_params_delete(self, client: OpenAI) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `permission_id` but received ''"): client.fine_tuning.checkpoints.permissions.with_raw_response.delete( permission_id="", - fine_tuned_model_checkpoint="ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd", + fine_tuned_model_checkpoint="ft:gpt-4.1-mini-2025-04-14:org:weather:B7R9VjQd", ) @@ -235,7 +235,7 @@ class TestAsyncPermissions: @parametrize async def test_method_create(self, async_client: AsyncOpenAI) -> None: permission = await async_client.fine_tuning.checkpoints.permissions.create( - fine_tuned_model_checkpoint="ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd", + fine_tuned_model_checkpoint="ft:gpt-4.1-mini-2025-04-14:org:weather:B7R9VjQd", project_ids=["string"], ) assert_matches_type(AsyncPage[PermissionCreateResponse], permission, path=["response"]) @@ -243,7 +243,7 @@ async def test_method_create(self, async_client: AsyncOpenAI) -> None: @parametrize async def test_raw_response_create(self, async_client: AsyncOpenAI) -> None: response = await async_client.fine_tuning.checkpoints.permissions.with_raw_response.create( - fine_tuned_model_checkpoint="ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd", + fine_tuned_model_checkpoint="ft:gpt-4.1-mini-2025-04-14:org:weather:B7R9VjQd", project_ids=["string"], ) @@ -255,7 +255,7 @@ async def test_raw_response_create(self, async_client: AsyncOpenAI) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncOpenAI) -> None: async with async_client.fine_tuning.checkpoints.permissions.with_streaming_response.create( - fine_tuned_model_checkpoint="ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd", + fine_tuned_model_checkpoint="ft:gpt-4.1-mini-2025-04-14:org:weather:B7R9VjQd", project_ids=["string"], ) as response: assert not response.is_closed @@ -389,7 +389,7 @@ async def test_path_params_list(self, async_client: AsyncOpenAI) -> None: async def test_method_delete(self, async_client: AsyncOpenAI) -> None: permission = await async_client.fine_tuning.checkpoints.permissions.delete( permission_id="cp_zc4Q7MP6XxulcVzj4MZdwsAB", - fine_tuned_model_checkpoint="ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd", + fine_tuned_model_checkpoint="ft:gpt-4.1-mini-2025-04-14:org:weather:B7R9VjQd", ) assert_matches_type(PermissionDeleteResponse, permission, path=["response"]) @@ -397,7 +397,7 @@ async def test_method_delete(self, async_client: AsyncOpenAI) -> None: async def test_raw_response_delete(self, async_client: AsyncOpenAI) -> None: response = await async_client.fine_tuning.checkpoints.permissions.with_raw_response.delete( permission_id="cp_zc4Q7MP6XxulcVzj4MZdwsAB", - fine_tuned_model_checkpoint="ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd", + fine_tuned_model_checkpoint="ft:gpt-4.1-mini-2025-04-14:org:weather:B7R9VjQd", ) assert response.is_closed is True @@ -409,7 +409,7 @@ async def test_raw_response_delete(self, async_client: AsyncOpenAI) -> None: async def test_streaming_response_delete(self, async_client: AsyncOpenAI) -> None: async with async_client.fine_tuning.checkpoints.permissions.with_streaming_response.delete( permission_id="cp_zc4Q7MP6XxulcVzj4MZdwsAB", - fine_tuned_model_checkpoint="ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd", + fine_tuned_model_checkpoint="ft:gpt-4.1-mini-2025-04-14:org:weather:B7R9VjQd", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -432,5 +432,5 @@ async def test_path_params_delete(self, async_client: AsyncOpenAI) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `permission_id` but received ''"): await async_client.fine_tuning.checkpoints.permissions.with_raw_response.delete( permission_id="", - fine_tuned_model_checkpoint="ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd", + fine_tuned_model_checkpoint="ft:gpt-4.1-mini-2025-04-14:org:weather:B7R9VjQd", ) diff --git a/tests/api_resources/fine_tuning/test_jobs.py b/tests/api_resources/fine_tuning/test_jobs.py index f95845f2a7..3f118763a4 100644 --- a/tests/api_resources/fine_tuning/test_jobs.py +++ b/tests/api_resources/fine_tuning/test_jobs.py @@ -24,7 +24,7 @@ class TestJobs: @parametrize def test_method_create(self, client: OpenAI) -> None: job = client.fine_tuning.jobs.create( - model="gpt-4o-mini", + model="gpt-4.1-mini-2025-04-14", training_file="file-abc123", ) assert_matches_type(FineTuningJob, job, path=["response"]) @@ -32,7 +32,7 @@ def test_method_create(self, client: OpenAI) -> None: @parametrize def test_method_create_with_all_params(self, client: OpenAI) -> None: job = client.fine_tuning.jobs.create( - model="gpt-4o-mini", + model="gpt-4.1-mini-2025-04-14", training_file="file-abc123", hyperparameters={ "batch_size": "auto", @@ -96,7 +96,7 @@ def test_method_create_with_all_params(self, client: OpenAI) -> None: @parametrize def test_raw_response_create(self, client: OpenAI) -> None: response = client.fine_tuning.jobs.with_raw_response.create( - model="gpt-4o-mini", + model="gpt-4.1-mini-2025-04-14", training_file="file-abc123", ) @@ -108,7 +108,7 @@ def test_raw_response_create(self, client: OpenAI) -> None: @parametrize def test_streaming_response_create(self, client: OpenAI) -> None: with client.fine_tuning.jobs.with_streaming_response.create( - model="gpt-4o-mini", + model="gpt-4.1-mini-2025-04-14", training_file="file-abc123", ) as response: assert not response.is_closed @@ -361,7 +361,7 @@ class TestAsyncJobs: @parametrize async def test_method_create(self, async_client: AsyncOpenAI) -> None: job = await async_client.fine_tuning.jobs.create( - model="gpt-4o-mini", + model="gpt-4.1-mini-2025-04-14", training_file="file-abc123", ) assert_matches_type(FineTuningJob, job, path=["response"]) @@ -369,7 +369,7 @@ async def test_method_create(self, async_client: AsyncOpenAI) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncOpenAI) -> None: job = await async_client.fine_tuning.jobs.create( - model="gpt-4o-mini", + model="gpt-4.1-mini-2025-04-14", training_file="file-abc123", hyperparameters={ "batch_size": "auto", @@ -433,7 +433,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncOpenAI) -> @parametrize async def test_raw_response_create(self, async_client: AsyncOpenAI) -> None: response = await async_client.fine_tuning.jobs.with_raw_response.create( - model="gpt-4o-mini", + model="gpt-4.1-mini-2025-04-14", training_file="file-abc123", ) @@ -445,7 +445,7 @@ async def test_raw_response_create(self, async_client: AsyncOpenAI) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncOpenAI) -> None: async with async_client.fine_tuning.jobs.with_streaming_response.create( - model="gpt-4o-mini", + model="gpt-4.1-mini-2025-04-14", training_file="file-abc123", ) as response: assert not response.is_closed diff --git a/tests/api_resources/realtime/test_calls.py b/tests/api_resources/realtime/test_calls.py index aaacada7ad..4d18681ad7 100644 --- a/tests/api_resources/realtime/test_calls.py +++ b/tests/api_resources/realtime/test_calls.py @@ -77,7 +77,7 @@ def test_method_create_with_all_params(self, client: OpenAI, respx2_mock: MockRo "include": ["item.input_audio_transcription.logprobs"], "instructions": "instructions", "max_output_tokens": "inf", - "model": "gpt-realtime", + "model": "gpt-realtime-2.1", "output_modalities": ["text"], "parallel_tool_calls": True, "prompt": { @@ -184,7 +184,7 @@ def test_method_accept_with_all_params(self, client: OpenAI) -> None: include=["item.input_audio_transcription.logprobs"], instructions="instructions", max_output_tokens="inf", - model="gpt-realtime", + model="gpt-realtime-2.1", output_modalities=["text"], parallel_tool_calls=True, prompt={ @@ -431,7 +431,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncOpenAI, re "include": ["item.input_audio_transcription.logprobs"], "instructions": "instructions", "max_output_tokens": "inf", - "model": "gpt-realtime", + "model": "gpt-realtime-2.1", "output_modalities": ["text"], "parallel_tool_calls": True, "prompt": { @@ -538,7 +538,7 @@ async def test_method_accept_with_all_params(self, async_client: AsyncOpenAI) -> include=["item.input_audio_transcription.logprobs"], instructions="instructions", max_output_tokens="inf", - model="gpt-realtime", + model="gpt-realtime-2.1", output_modalities=["text"], parallel_tool_calls=True, prompt={ diff --git a/tests/api_resources/realtime/test_client_secrets.py b/tests/api_resources/realtime/test_client_secrets.py index bb7eeebe5e..3b94fb94ae 100644 --- a/tests/api_resources/realtime/test_client_secrets.py +++ b/tests/api_resources/realtime/test_client_secrets.py @@ -71,7 +71,7 @@ def test_method_create_with_all_params(self, client: OpenAI) -> None: "include": ["item.input_audio_transcription.logprobs"], "instructions": "instructions", "max_output_tokens": "inf", - "model": "gpt-realtime", + "model": "gpt-realtime-2.1", "output_modalities": ["text"], "parallel_tool_calls": True, "prompt": { @@ -175,7 +175,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncOpenAI) -> "include": ["item.input_audio_transcription.logprobs"], "instructions": "instructions", "max_output_tokens": "inf", - "model": "gpt-realtime", + "model": "gpt-realtime-2.1", "output_modalities": ["text"], "parallel_tool_calls": True, "prompt": { diff --git a/tests/api_resources/test_conversations.py b/tests/api_resources/test_conversations.py index 9cc9c44042..4be00a5909 100644 --- a/tests/api_resources/test_conversations.py +++ b/tests/api_resources/test_conversations.py @@ -37,6 +37,7 @@ def test_method_create_with_all_params(self, client: OpenAI) -> None: } ], metadata={"foo": "string"}, + safety_identifier="safety_identifier", ) assert_matches_type(Conversation, conversation, path=["response"]) @@ -201,6 +202,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncOpenAI) -> } ], metadata={"foo": "string"}, + safety_identifier="safety_identifier", ) assert_matches_type(Conversation, conversation, path=["response"]) diff --git a/tests/api_resources/test_images.py b/tests/api_resources/test_images.py index 6054a06d27..8ab83ba7f1 100644 --- a/tests/api_resources/test_images.py +++ b/tests/api_resources/test_images.py @@ -70,7 +70,7 @@ def test_streaming_response_create_variation(self, client: OpenAI) -> None: def test_method_edit_overload_1(self, client: OpenAI) -> None: image = client.images.edit( image=b"Example data", - prompt="A cute baby sea otter wearing a beret", + prompt="Add a watercolor effect to this image", ) assert_matches_type(ImagesResponse, image, path=["response"]) @@ -78,7 +78,7 @@ def test_method_edit_overload_1(self, client: OpenAI) -> None: def test_method_edit_with_all_params_overload_1(self, client: OpenAI) -> None: image = client.images.edit( image=b"Example data", - prompt="A cute baby sea otter wearing a beret", + prompt="Add a watercolor effect to this image", background="transparent", complexity="low", frame_count=2, @@ -86,7 +86,7 @@ def test_method_edit_with_all_params_overload_1(self, client: OpenAI) -> None: input_fidelity="high", markup=b"Example data", mask=b"Example data", - model="gpt-image-1.5", + model="gpt-image-2.6-flare", n=1, output_compression=100, output_format="png", @@ -108,7 +108,7 @@ def test_method_edit_with_all_params_overload_1(self, client: OpenAI) -> None: def test_raw_response_edit_overload_1(self, client: OpenAI) -> None: response = client.images.with_raw_response.edit( image=b"Example data", - prompt="A cute baby sea otter wearing a beret", + prompt="Add a watercolor effect to this image", ) assert response.is_closed is True @@ -120,7 +120,7 @@ def test_raw_response_edit_overload_1(self, client: OpenAI) -> None: def test_streaming_response_edit_overload_1(self, client: OpenAI) -> None: with client.images.with_streaming_response.edit( image=b"Example data", - prompt="A cute baby sea otter wearing a beret", + prompt="Add a watercolor effect to this image", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -134,7 +134,7 @@ def test_streaming_response_edit_overload_1(self, client: OpenAI) -> None: def test_method_edit_overload_2(self, client: OpenAI) -> None: image_stream = client.images.edit( image=b"Example data", - prompt="A cute baby sea otter wearing a beret", + prompt="Add a watercolor effect to this image", stream=True, ) image_stream.response.close() @@ -143,7 +143,7 @@ def test_method_edit_overload_2(self, client: OpenAI) -> None: def test_method_edit_with_all_params_overload_2(self, client: OpenAI) -> None: image_stream = client.images.edit( image=b"Example data", - prompt="A cute baby sea otter wearing a beret", + prompt="Add a watercolor effect to this image", stream=True, background="transparent", complexity="low", @@ -152,7 +152,7 @@ def test_method_edit_with_all_params_overload_2(self, client: OpenAI) -> None: input_fidelity="high", markup=b"Example data", mask=b"Example data", - model="gpt-image-1.5", + model="gpt-image-2.6-flare", n=1, output_compression=100, output_format="png", @@ -173,7 +173,7 @@ def test_method_edit_with_all_params_overload_2(self, client: OpenAI) -> None: def test_raw_response_edit_overload_2(self, client: OpenAI) -> None: response = client.images.with_raw_response.edit( image=b"Example data", - prompt="A cute baby sea otter wearing a beret", + prompt="Add a watercolor effect to this image", stream=True, ) @@ -186,7 +186,7 @@ def test_raw_response_edit_overload_2(self, client: OpenAI) -> None: def test_streaming_response_edit_overload_2(self, client: OpenAI) -> None: with client.images.with_streaming_response.edit( image=b"Example data", - prompt="A cute baby sea otter wearing a beret", + prompt="Add a watercolor effect to this image", stream=True, ) as response: assert not response.is_closed @@ -213,7 +213,7 @@ def test_method_generate_with_all_params_overload_1(self, client: OpenAI) -> Non complexity="low", frame_count=2, frame_duration_ms=20, - model="gpt-image-2.5-flare", + model="gpt-image-2.6-flare", moderation="low", n=1, output_compression=100, @@ -274,7 +274,7 @@ def test_method_generate_with_all_params_overload_2(self, client: OpenAI) -> Non complexity="low", frame_count=2, frame_duration_ms=20, - model="gpt-image-2.5-flare", + model="gpt-image-2.6-flare", moderation="low", n=1, output_compression=100, @@ -379,7 +379,7 @@ async def test_streaming_response_create_variation(self, async_client: AsyncOpen async def test_method_edit_overload_1(self, async_client: AsyncOpenAI) -> None: image = await async_client.images.edit( image=b"Example data", - prompt="A cute baby sea otter wearing a beret", + prompt="Add a watercolor effect to this image", ) assert_matches_type(ImagesResponse, image, path=["response"]) @@ -387,7 +387,7 @@ async def test_method_edit_overload_1(self, async_client: AsyncOpenAI) -> None: async def test_method_edit_with_all_params_overload_1(self, async_client: AsyncOpenAI) -> None: image = await async_client.images.edit( image=b"Example data", - prompt="A cute baby sea otter wearing a beret", + prompt="Add a watercolor effect to this image", background="transparent", complexity="low", frame_count=2, @@ -395,7 +395,7 @@ async def test_method_edit_with_all_params_overload_1(self, async_client: AsyncO input_fidelity="high", markup=b"Example data", mask=b"Example data", - model="gpt-image-1.5", + model="gpt-image-2.6-flare", n=1, output_compression=100, output_format="png", @@ -417,7 +417,7 @@ async def test_method_edit_with_all_params_overload_1(self, async_client: AsyncO async def test_raw_response_edit_overload_1(self, async_client: AsyncOpenAI) -> None: response = await async_client.images.with_raw_response.edit( image=b"Example data", - prompt="A cute baby sea otter wearing a beret", + prompt="Add a watercolor effect to this image", ) assert response.is_closed is True @@ -429,7 +429,7 @@ async def test_raw_response_edit_overload_1(self, async_client: AsyncOpenAI) -> async def test_streaming_response_edit_overload_1(self, async_client: AsyncOpenAI) -> None: async with async_client.images.with_streaming_response.edit( image=b"Example data", - prompt="A cute baby sea otter wearing a beret", + prompt="Add a watercolor effect to this image", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -443,7 +443,7 @@ async def test_streaming_response_edit_overload_1(self, async_client: AsyncOpenA async def test_method_edit_overload_2(self, async_client: AsyncOpenAI) -> None: image_stream = await async_client.images.edit( image=b"Example data", - prompt="A cute baby sea otter wearing a beret", + prompt="Add a watercolor effect to this image", stream=True, ) await image_stream.response.aclose() @@ -452,7 +452,7 @@ async def test_method_edit_overload_2(self, async_client: AsyncOpenAI) -> None: async def test_method_edit_with_all_params_overload_2(self, async_client: AsyncOpenAI) -> None: image_stream = await async_client.images.edit( image=b"Example data", - prompt="A cute baby sea otter wearing a beret", + prompt="Add a watercolor effect to this image", stream=True, background="transparent", complexity="low", @@ -461,7 +461,7 @@ async def test_method_edit_with_all_params_overload_2(self, async_client: AsyncO input_fidelity="high", markup=b"Example data", mask=b"Example data", - model="gpt-image-1.5", + model="gpt-image-2.6-flare", n=1, output_compression=100, output_format="png", @@ -482,7 +482,7 @@ async def test_method_edit_with_all_params_overload_2(self, async_client: AsyncO async def test_raw_response_edit_overload_2(self, async_client: AsyncOpenAI) -> None: response = await async_client.images.with_raw_response.edit( image=b"Example data", - prompt="A cute baby sea otter wearing a beret", + prompt="Add a watercolor effect to this image", stream=True, ) @@ -495,7 +495,7 @@ async def test_raw_response_edit_overload_2(self, async_client: AsyncOpenAI) -> async def test_streaming_response_edit_overload_2(self, async_client: AsyncOpenAI) -> None: async with async_client.images.with_streaming_response.edit( image=b"Example data", - prompt="A cute baby sea otter wearing a beret", + prompt="Add a watercolor effect to this image", stream=True, ) as response: assert not response.is_closed @@ -522,7 +522,7 @@ async def test_method_generate_with_all_params_overload_1(self, async_client: As complexity="low", frame_count=2, frame_duration_ms=20, - model="gpt-image-2.5-flare", + model="gpt-image-2.6-flare", moderation="low", n=1, output_compression=100, @@ -583,7 +583,7 @@ async def test_method_generate_with_all_params_overload_2(self, async_client: As complexity="low", frame_count=2, frame_duration_ms=20, - model="gpt-image-2.5-flare", + model="gpt-image-2.6-flare", moderation="low", n=1, output_compression=100, diff --git a/tests/api_resources/test_models.py b/tests/api_resources/test_models.py index 924458da14..c3478697e7 100644 --- a/tests/api_resources/test_models.py +++ b/tests/api_resources/test_models.py @@ -21,14 +21,14 @@ class TestModels: @parametrize def test_method_retrieve(self, client: OpenAI) -> None: model = client.models.retrieve( - "gpt-6-astra", + "gpt-6.2-astra", ) assert_matches_type(Model, model, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: OpenAI) -> None: response = client.models.with_raw_response.retrieve( - "gpt-6-astra", + "gpt-6.2-astra", ) assert response.is_closed is True @@ -39,7 +39,7 @@ def test_raw_response_retrieve(self, client: OpenAI) -> None: @parametrize def test_streaming_response_retrieve(self, client: OpenAI) -> None: with client.models.with_streaming_response.retrieve( - "gpt-6-astra", + "gpt-6.2-astra", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -84,14 +84,14 @@ def test_streaming_response_list(self, client: OpenAI) -> None: @parametrize def test_method_delete(self, client: OpenAI) -> None: model = client.models.delete( - "ft:gpt-4o-mini:acemeco:suffix:abc123", + "ft:gpt-4.1-mini-2025-04-14:acemeco:suffix:abc123", ) assert_matches_type(ModelDeleted, model, path=["response"]) @parametrize def test_raw_response_delete(self, client: OpenAI) -> None: response = client.models.with_raw_response.delete( - "ft:gpt-4o-mini:acemeco:suffix:abc123", + "ft:gpt-4.1-mini-2025-04-14:acemeco:suffix:abc123", ) assert response.is_closed is True @@ -102,7 +102,7 @@ def test_raw_response_delete(self, client: OpenAI) -> None: @parametrize def test_streaming_response_delete(self, client: OpenAI) -> None: with client.models.with_streaming_response.delete( - "ft:gpt-4o-mini:acemeco:suffix:abc123", + "ft:gpt-4.1-mini-2025-04-14:acemeco:suffix:abc123", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -128,14 +128,14 @@ class TestAsyncModels: @parametrize async def test_method_retrieve(self, async_client: AsyncOpenAI) -> None: model = await async_client.models.retrieve( - "gpt-6-astra", + "gpt-6.2-astra", ) assert_matches_type(Model, model, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncOpenAI) -> None: response = await async_client.models.with_raw_response.retrieve( - "gpt-6-astra", + "gpt-6.2-astra", ) assert response.is_closed is True @@ -146,7 +146,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncOpenAI) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncOpenAI) -> None: async with async_client.models.with_streaming_response.retrieve( - "gpt-6-astra", + "gpt-6.2-astra", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -191,14 +191,14 @@ async def test_streaming_response_list(self, async_client: AsyncOpenAI) -> None: @parametrize async def test_method_delete(self, async_client: AsyncOpenAI) -> None: model = await async_client.models.delete( - "ft:gpt-4o-mini:acemeco:suffix:abc123", + "ft:gpt-4.1-mini-2025-04-14:acemeco:suffix:abc123", ) assert_matches_type(ModelDeleted, model, path=["response"]) @parametrize async def test_raw_response_delete(self, async_client: AsyncOpenAI) -> None: response = await async_client.models.with_raw_response.delete( - "ft:gpt-4o-mini:acemeco:suffix:abc123", + "ft:gpt-4.1-mini-2025-04-14:acemeco:suffix:abc123", ) assert response.is_closed is True @@ -209,7 +209,7 @@ async def test_raw_response_delete(self, async_client: AsyncOpenAI) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncOpenAI) -> None: async with async_client.models.with_streaming_response.delete( - "ft:gpt-4o-mini:acemeco:suffix:abc123", + "ft:gpt-4.1-mini-2025-04-14:acemeco:suffix:abc123", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_responses.py b/tests/api_resources/test_responses.py index 465d034cde..cb367ad7e9 100644 --- a/tests/api_resources/test_responses.py +++ b/tests/api_resources/test_responses.py @@ -43,12 +43,12 @@ def test_method_create_with_all_params_overload_1(self, client: OpenAI) -> None: conversation="string", image={"context_compression": "auto"}, include=["file_search_call.results"], - input="string", + input="Write a one-sentence bedtime story about a unicorn.", instructions="instructions", max_output_tokens=16, max_tool_calls=0, metadata={"foo": "string"}, - model="gpt-6-astra", + model="gpt-6.2-astra", moderation={ "model": "model", "policy": { @@ -155,12 +155,12 @@ def test_method_create_with_all_params_overload_2(self, client: OpenAI) -> None: conversation="string", image={"context_compression": "auto"}, include=["file_search_call.results"], - input="string", + input="Write a one-sentence bedtime story about a unicorn.", instructions="instructions", max_output_tokens=16, max_tool_calls=0, metadata={"foo": "string"}, - model="gpt-6-astra", + model="gpt-6.2-astra", moderation={ "model": "model", "policy": { @@ -445,6 +445,7 @@ def test_method_compact_with_all_params(self, client: OpenAI) -> None: "ttl": "30m", }, prompt_cache_retention="in_memory", + safety_identifier="safety_identifier", service_tier="auto", ) assert_matches_type(CompactedResponse, response, path=["response"]) @@ -502,12 +503,12 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn conversation="string", image={"context_compression": "auto"}, include=["file_search_call.results"], - input="string", + input="Write a one-sentence bedtime story about a unicorn.", instructions="instructions", max_output_tokens=16, max_tool_calls=0, metadata={"foo": "string"}, - model="gpt-6-astra", + model="gpt-6.2-astra", moderation={ "model": "model", "policy": { @@ -614,12 +615,12 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn conversation="string", image={"context_compression": "auto"}, include=["file_search_call.results"], - input="string", + input="Write a one-sentence bedtime story about a unicorn.", instructions="instructions", max_output_tokens=16, max_tool_calls=0, metadata={"foo": "string"}, - model="gpt-6-astra", + model="gpt-6.2-astra", moderation={ "model": "model", "policy": { @@ -904,6 +905,7 @@ async def test_method_compact_with_all_params(self, async_client: AsyncOpenAI) - "ttl": "30m", }, prompt_cache_retention="in_memory", + safety_identifier="safety_identifier", service_tier="auto", ) assert_matches_type(CompactedResponse, response, path=["response"])