From bd97003c1f96fd069299097878cef01187b8c1a6 Mon Sep 17 00:00:00 2001 From: marcuswood-oai <323319819+marcuswood-oai@users.noreply.github.com> Date: Wed, 23 Sep 2026 21:43:16 +0000 Subject: [PATCH] feat(api): add Cyber access programs to Responses Castiron-Internal-PR: https://github.com/openai/openai-ruby-internal/pull/148 Castiron-Source-SHA: da0b25621904702af542740943d14df98d46ddcc Castiron-Public-Base-SHA: c7047782ff2ae38a859a08ef199e67a79c16b9fe --- .castiron.stats.yml | 12 +- api_reference/openapi.transformed.yml | 102 +++++++++++++- lib/openai/models/beta/beta_response.rb | 36 ++++- .../beta/beta_responses_client_event.rb | 71 +++++++++- .../models/beta/response_create_params.rb | 66 ++++++++- lib/openai/models/responses/response.rb | 36 ++++- .../responses/response_create_params.rb | 66 ++++++++- .../responses/responses_client_event.rb | 71 +++++++++- lib/openai/resources/beta/responses.rb | 10 +- lib/openai/resources/responses.rb | 9 +- rbi/openai/models/beta/beta_response.rbi | 63 +++++++++ .../beta/beta_responses_client_event.rbi | 124 +++++++++++++++++ .../models/beta/response_create_params.rbi | 99 ++++++++++++++ rbi/openai/models/responses/response.rbi | 63 +++++++++ .../responses/response_create_params.rbi | 106 +++++++++++++++ .../responses/responses_client_event.rbi | 125 ++++++++++++++++++ rbi/openai/resources/beta/responses.rbi | 6 + rbi/openai/resources/responses.rbi | 11 ++ sig/openai/models/beta/beta_response.rbs | 35 +++++ .../beta/beta_responses_client_event.rbs | 77 +++++++++++ .../models/beta/response_create_params.rbs | 77 +++++++++++ sig/openai/models/responses/response.rbs | 35 +++++ .../responses/response_create_params.rbs | 77 +++++++++++ .../responses/responses_client_event.rbs | 77 +++++++++++ sig/openai/resources/beta/responses.rbs | 2 + sig/openai/resources/responses.rbs | 4 + test/openai/resources/beta/responses_test.rb | 3 + test/openai/resources/responses_test.rb | 3 + 28 files changed, 1444 insertions(+), 22 deletions(-) diff --git a/.castiron.stats.yml b/.castiron.stats.yml index 521844da2..17da93045 100644 --- a/.castiron.stats.yml +++ b/.castiron.stats.yml @@ -1,8 +1,8 @@ schema_version: 1 -generation_id: 062e7c51-8ed8-4111-b6cf-507fa9befcce -openapi_spec_hash: 687580b2f55d2dada661f0387a4b3e0d -openapi_transformed_spec_hash: 904296217a5077aa14766c6c58aa87d9 +generation_id: 05ad9a79-c402-46ed-9461-e99b2679ab63 +openapi_spec_hash: c80aa413841be7f1fcc2e846a6fa84b6 +openapi_transformed_spec_hash: f863c79711166d4468eb3f22fb1cd451 config_hash: 84cdcc959ee7140cc9a65e9b642c097b -codegen_sha: fd63e5c8b7583152acfe88ba6addb8adadcb3cc4 -codegen_hash: 932d507add86de293034431eea802f35ed4accc8c8c0e63c0e2be239178a7869 -public_codegen_sha: edeb207d57bd3fe367f2b78137d7508b6bf08364 +codegen_sha: 7a208d1948b47012a713121f3bab54b2a6c9c2d2 +codegen_hash: 3a3fef1a265f41d2e2924d0a9f959596b939905341991ebb5bd8f5343334fcc3 +public_codegen_sha: 78bd5c69debaa20bd2d980eb7d4d9626c47dc25d diff --git a/api_reference/openapi.transformed.yml b/api_reference/openapi.transformed.yml index fdf489614..d707eb121 100644 --- a/api_reference/openapi.transformed.yml +++ b/api_reference/openapi.transformed.yml @@ -16740,6 +16740,7 @@ paths: { "id": "resp_67ccd2bed1ec8190b14f964abc0542670bb6a6b452d3795b", "object": "response", + "access_programs": null, "created_at": 1741476542, "status": "completed", "completed_at": 1741476543, @@ -16889,6 +16890,7 @@ paths: { "id": "resp_67ccd3a9da748190baa7f1570fe91ac604becb25c45c1d41", "object": "response", + "access_programs": null, "created_at": 1741476777, "status": "completed", "completed_at": 1741476778, @@ -17016,6 +17018,7 @@ paths: { "id": "resp_686eef60237881a2bd1180bb8b13de430e34c516d176ff86", "object": "response", + "access_programs": null, "created_at": 1752100704, "status": "completed", "completed_at": 1752100705, @@ -17138,6 +17141,7 @@ paths: { "id": "resp_67ccf18ef5fc8190b16dbee19bc54e5f087bb177ab789d5c", "object": "response", + "access_programs": null, "created_at": 1741484430, "status": "completed", "completed_at": 1741484431, @@ -17310,6 +17314,7 @@ paths: { "id": "resp_67ccf4c55fc48190b71bd0463ad3306d09504fb6872380d7", "object": "response", + "access_programs": null, "created_at": 1741485253, "status": "completed", "completed_at": 1741485254, @@ -17507,10 +17512,10 @@ paths: } response: | event: response.created - data: {"type":"response.created","response":{"id":"resp_67c9fdcecf488190bdd9a0409de3a1ec07b8b0ad4e5eb654","object":"response","created_at":1741290958,"status":"in_progress","error":null,"incomplete_details":null,"instructions":"You are a helpful assistant.","max_output_tokens":null,"model":"gpt-6-astra","output":[],"parallel_tool_calls":true,"previous_response_id":null,"reasoning":{"effort":null,"summary":null},"store":true,"temperature":1.0,"text":{"format":{"type":"text"}},"tool_choice":"auto","tools":[],"top_p":1.0,"truncation":"disabled","usage":null,"user":null,"metadata":{}}} + data: {"type":"response.created","response":{"id":"resp_67c9fdcecf488190bdd9a0409de3a1ec07b8b0ad4e5eb654","object":"response","access_programs":null,"created_at":1741290958,"status":"in_progress","error":null,"incomplete_details":null,"instructions":"You are a helpful assistant.","max_output_tokens":null,"model":"gpt-6-astra","output":[],"parallel_tool_calls":true,"previous_response_id":null,"reasoning":{"effort":null,"summary":null},"store":true,"temperature":1.0,"text":{"format":{"type":"text"}},"tool_choice":"auto","tools":[],"top_p":1.0,"truncation":"disabled","usage":null,"user":null,"metadata":{}}} event: response.in_progress - data: {"type":"response.in_progress","response":{"id":"resp_67c9fdcecf488190bdd9a0409de3a1ec07b8b0ad4e5eb654","object":"response","created_at":1741290958,"status":"in_progress","error":null,"incomplete_details":null,"instructions":"You are a helpful assistant.","max_output_tokens":null,"model":"gpt-6-astra","output":[],"parallel_tool_calls":true,"previous_response_id":null,"reasoning":{"effort":null,"summary":null},"store":true,"temperature":1.0,"text":{"format":{"type":"text"}},"tool_choice":"auto","tools":[],"top_p":1.0,"truncation":"disabled","usage":null,"user":null,"metadata":{}}} + data: {"type":"response.in_progress","response":{"id":"resp_67c9fdcecf488190bdd9a0409de3a1ec07b8b0ad4e5eb654","object":"response","access_programs":null,"created_at":1741290958,"status":"in_progress","error":null,"incomplete_details":null,"instructions":"You are a helpful assistant.","max_output_tokens":null,"model":"gpt-6-astra","output":[],"parallel_tool_calls":true,"previous_response_id":null,"reasoning":{"effort":null,"summary":null},"store":true,"temperature":1.0,"text":{"format":{"type":"text"}},"tool_choice":"auto","tools":[],"top_p":1.0,"truncation":"disabled","usage":null,"user":null,"metadata":{}}} event: response.output_item.added data: {"type":"response.output_item.added","output_index":0,"item":{"id":"msg_67c9fdcf37fc8190ba82116e33fb28c507b8b0ad4e5eb654","type":"message","status":"in_progress","role":"assistant","content":[]}} @@ -17533,7 +17538,7 @@ paths: data: {"type":"response.output_item.done","output_index":0,"item":{"id":"msg_67c9fdcf37fc8190ba82116e33fb28c507b8b0ad4e5eb654","type":"message","status":"completed","role":"assistant","content":[{"type":"output_text","text":"Hi there! How can I assist you today?","annotations":[]}]}} event: response.completed - data: {"type":"response.completed","response":{"id":"resp_67c9fdcecf488190bdd9a0409de3a1ec07b8b0ad4e5eb654","object":"response","created_at":1741290958,"status":"completed","error":null,"incomplete_details":null,"instructions":"You are a helpful assistant.","max_output_tokens":null,"model":"gpt-6-astra","output":[{"id":"msg_67c9fdcf37fc8190ba82116e33fb28c507b8b0ad4e5eb654","type":"message","status":"completed","role":"assistant","content":[{"type":"output_text","text":"Hi there! How can I assist you today?","annotations":[]}]}],"parallel_tool_calls":true,"previous_response_id":null,"reasoning":{"effort":null,"summary":null},"store":true,"temperature":1.0,"text":{"format":{"type":"text"}},"tool_choice":"auto","tools":[],"top_p":1.0,"truncation":"disabled","usage":{"input_tokens":37,"output_tokens":11,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":48},"user":null,"metadata":{}}} + data: {"type":"response.completed","response":{"id":"resp_67c9fdcecf488190bdd9a0409de3a1ec07b8b0ad4e5eb654","object":"response","access_programs":null,"created_at":1741290958,"status":"completed","error":null,"incomplete_details":null,"instructions":"You are a helpful assistant.","max_output_tokens":null,"model":"gpt-6-astra","output":[{"id":"msg_67c9fdcf37fc8190ba82116e33fb28c507b8b0ad4e5eb654","type":"message","status":"completed","role":"assistant","content":[{"type":"output_text","text":"Hi there! How can I assist you today?","annotations":[]}]}],"parallel_tool_calls":true,"previous_response_id":null,"reasoning":{"effort":null,"summary":null},"store":true,"temperature":1.0,"text":{"format":{"type":"text"}},"tool_choice":"auto","tools":[],"top_p":1.0,"truncation":"disabled","usage":{"input_tokens":37,"output_tokens":11,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":48},"user":null,"metadata":{}}} - title: Functions request: curl: | @@ -17674,6 +17679,7 @@ paths: { "id": "resp_67ca09c5efe0819096d0511c92b8c890096610f474011cc0", "object": "response", + "access_programs": null, "created_at": 1741294021, "status": "completed", "completed_at": 1741294022, @@ -17812,6 +17818,7 @@ paths: { "id": "resp_67ccd7eca01881908ff0b5146584e408072912b2993db808", "object": "response", + "access_programs": null, "created_at": 1741477868, "status": "completed", "completed_at": 1741477869, @@ -17952,6 +17959,7 @@ paths: { "id": "resp_67cb71b351908190a308f3859487620d06981a8637e6bc44", "object": "response", + "access_programs": null, "created_at": 1741386163, "status": "completed", "completed_at": 1741386164, @@ -18116,6 +18124,7 @@ paths: { "id": "resp_67cb71b351908190a308f3859487620d06981a8637e6bc44", "object": "response", + "access_programs": null, "created_at": 1741386163, "status": "cancelled", "background": true, @@ -28883,6 +28892,7 @@ paths: { "id": "resp_67ccd2bed1ec8190b14f964abc0542670bb6a6b452d3795b", "object": "response", + "access_programs": null, "created_at": 1741476542, "status": "completed", "completed_at": 1741476543, @@ -29032,6 +29042,7 @@ paths: { "id": "resp_67ccd3a9da748190baa7f1570fe91ac604becb25c45c1d41", "object": "response", + "access_programs": null, "created_at": 1741476777, "status": "completed", "completed_at": 1741476778, @@ -29159,6 +29170,7 @@ paths: { "id": "resp_686eef60237881a2bd1180bb8b13de430e34c516d176ff86", "object": "response", + "access_programs": null, "created_at": 1752100704, "status": "completed", "completed_at": 1752100705, @@ -29281,6 +29293,7 @@ paths: { "id": "resp_67ccf18ef5fc8190b16dbee19bc54e5f087bb177ab789d5c", "object": "response", + "access_programs": null, "created_at": 1741484430, "status": "completed", "completed_at": 1741484431, @@ -29453,6 +29466,7 @@ paths: { "id": "resp_67ccf4c55fc48190b71bd0463ad3306d09504fb6872380d7", "object": "response", + "access_programs": null, "created_at": 1741485253, "status": "completed", "completed_at": 1741485254, @@ -29650,10 +29664,10 @@ paths: } response: | event: response.created - data: {"type":"response.created","response":{"id":"resp_67c9fdcecf488190bdd9a0409de3a1ec07b8b0ad4e5eb654","object":"response","created_at":1741290958,"status":"in_progress","error":null,"incomplete_details":null,"instructions":"You are a helpful assistant.","max_output_tokens":null,"model":"gpt-6-astra","output":[],"parallel_tool_calls":true,"previous_response_id":null,"reasoning":{"effort":null,"summary":null},"store":true,"temperature":1.0,"text":{"format":{"type":"text"}},"tool_choice":"auto","tools":[],"top_p":1.0,"truncation":"disabled","usage":null,"user":null,"metadata":{}}} + data: {"type":"response.created","response":{"id":"resp_67c9fdcecf488190bdd9a0409de3a1ec07b8b0ad4e5eb654","object":"response","access_programs":null,"created_at":1741290958,"status":"in_progress","error":null,"incomplete_details":null,"instructions":"You are a helpful assistant.","max_output_tokens":null,"model":"gpt-6-astra","output":[],"parallel_tool_calls":true,"previous_response_id":null,"reasoning":{"effort":null,"summary":null},"store":true,"temperature":1.0,"text":{"format":{"type":"text"}},"tool_choice":"auto","tools":[],"top_p":1.0,"truncation":"disabled","usage":null,"user":null,"metadata":{}}} event: response.in_progress - data: {"type":"response.in_progress","response":{"id":"resp_67c9fdcecf488190bdd9a0409de3a1ec07b8b0ad4e5eb654","object":"response","created_at":1741290958,"status":"in_progress","error":null,"incomplete_details":null,"instructions":"You are a helpful assistant.","max_output_tokens":null,"model":"gpt-6-astra","output":[],"parallel_tool_calls":true,"previous_response_id":null,"reasoning":{"effort":null,"summary":null},"store":true,"temperature":1.0,"text":{"format":{"type":"text"}},"tool_choice":"auto","tools":[],"top_p":1.0,"truncation":"disabled","usage":null,"user":null,"metadata":{}}} + data: {"type":"response.in_progress","response":{"id":"resp_67c9fdcecf488190bdd9a0409de3a1ec07b8b0ad4e5eb654","object":"response","access_programs":null,"created_at":1741290958,"status":"in_progress","error":null,"incomplete_details":null,"instructions":"You are a helpful assistant.","max_output_tokens":null,"model":"gpt-6-astra","output":[],"parallel_tool_calls":true,"previous_response_id":null,"reasoning":{"effort":null,"summary":null},"store":true,"temperature":1.0,"text":{"format":{"type":"text"}},"tool_choice":"auto","tools":[],"top_p":1.0,"truncation":"disabled","usage":null,"user":null,"metadata":{}}} event: response.output_item.added data: {"type":"response.output_item.added","output_index":0,"item":{"id":"msg_67c9fdcf37fc8190ba82116e33fb28c507b8b0ad4e5eb654","type":"message","status":"in_progress","role":"assistant","content":[]}} @@ -29676,7 +29690,7 @@ paths: data: {"type":"response.output_item.done","output_index":0,"item":{"id":"msg_67c9fdcf37fc8190ba82116e33fb28c507b8b0ad4e5eb654","type":"message","status":"completed","role":"assistant","content":[{"type":"output_text","text":"Hi there! How can I assist you today?","annotations":[]}]}} event: response.completed - data: {"type":"response.completed","response":{"id":"resp_67c9fdcecf488190bdd9a0409de3a1ec07b8b0ad4e5eb654","object":"response","created_at":1741290958,"status":"completed","error":null,"incomplete_details":null,"instructions":"You are a helpful assistant.","max_output_tokens":null,"model":"gpt-6-astra","output":[{"id":"msg_67c9fdcf37fc8190ba82116e33fb28c507b8b0ad4e5eb654","type":"message","status":"completed","role":"assistant","content":[{"type":"output_text","text":"Hi there! How can I assist you today?","annotations":[]}]}],"parallel_tool_calls":true,"previous_response_id":null,"reasoning":{"effort":null,"summary":null},"store":true,"temperature":1.0,"text":{"format":{"type":"text"}},"tool_choice":"auto","tools":[],"top_p":1.0,"truncation":"disabled","usage":{"input_tokens":37,"output_tokens":11,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":48},"user":null,"metadata":{}}} + data: {"type":"response.completed","response":{"id":"resp_67c9fdcecf488190bdd9a0409de3a1ec07b8b0ad4e5eb654","object":"response","access_programs":null,"created_at":1741290958,"status":"completed","error":null,"incomplete_details":null,"instructions":"You are a helpful assistant.","max_output_tokens":null,"model":"gpt-6-astra","output":[{"id":"msg_67c9fdcf37fc8190ba82116e33fb28c507b8b0ad4e5eb654","type":"message","status":"completed","role":"assistant","content":[{"type":"output_text","text":"Hi there! How can I assist you today?","annotations":[]}]}],"parallel_tool_calls":true,"previous_response_id":null,"reasoning":{"effort":null,"summary":null},"store":true,"temperature":1.0,"text":{"format":{"type":"text"}},"tool_choice":"auto","tools":[],"top_p":1.0,"truncation":"disabled","usage":{"input_tokens":37,"output_tokens":11,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":48},"user":null,"metadata":{}}} - title: Functions request: curl: | @@ -29817,6 +29831,7 @@ paths: { "id": "resp_67ca09c5efe0819096d0511c92b8c890096610f474011cc0", "object": "response", + "access_programs": null, "created_at": 1741294021, "status": "completed", "completed_at": 1741294022, @@ -29955,6 +29970,7 @@ paths: { "id": "resp_67ccd7eca01881908ff0b5146584e408072912b2993db808", "object": "response", + "access_programs": null, "created_at": 1741477868, "status": "completed", "completed_at": 1741477869, @@ -30122,6 +30138,7 @@ paths: { "id": "resp_67cb71b351908190a308f3859487620d06981a8637e6bc44", "object": "response", + "access_programs": null, "created_at": 1741386163, "status": "completed", "completed_at": 1741386164, @@ -30312,6 +30329,7 @@ paths: { "id": "resp_67cb71b351908190a308f3859487620d06981a8637e6bc44", "object": "response", + "access_programs": null, "created_at": 1741386163, "status": "cancelled", "background": true, @@ -35529,6 +35547,7 @@ components: propertyName: type seed: type: integer + format: int64 minimum: -9223372036854775808 maximum: 9223372036854775807 nullable: true @@ -35539,7 +35558,6 @@ components: Determinism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend. x-oaiMeta: beta: true - format: int64 stream_options: $ref: '#/components/schemas/ChatCompletionStreamOptions' tools: @@ -37959,6 +37977,8 @@ components: - $ref: '#/components/schemas/ResponseProperties' - type: object properties: + access_programs: + $ref: '#/components/schemas/AccessProgramsParam' prompt_cache_options: $ref: '#/components/schemas/ResponsePromptCacheOptionsParam' service_tier: @@ -56526,6 +56546,10 @@ components: - cancelled - queued - incomplete + access_programs: + anyOf: + - $ref: '#/components/schemas/AccessProgramsBody' + - type: 'null' created_at: type: number format: unixtime @@ -56638,6 +56662,7 @@ components: type: integer - type: 'null' required: + - access_programs - id - object - created_at @@ -56997,6 +57022,7 @@ components: "response": { "id": "resp_123", "object": "response", + "access_programs": null, "created_at": 1740855869, "status": "completed", "completed_at": 1740855870, @@ -57244,6 +57270,7 @@ components: "response": { "id": "resp_67ccfcdd16748190a91872c75d38539e09e4d4aac714747c", "object": "response", + "access_programs": null, "created_at": 1741487325, "status": "in_progress", "completed_at": null, @@ -57479,6 +57506,7 @@ components: "response": { "id": "resp_123", "object": "response", + "access_programs": null, "created_at": 1740855869, "status": "failed", "completed_at": null, @@ -58017,6 +58045,7 @@ components: "response": { "id": "resp_67ccfcdd16748190a91872c75d38539e09e4d4aac714747c", "object": "response", + "access_programs": null, "created_at": 1741487325, "status": "in_progress", "completed_at": null, @@ -58085,6 +58114,7 @@ components: "response": { "id": "resp_123", "object": "response", + "access_programs": null, "created_at": 1740855869, "status": "incomplete", "completed_at": null, @@ -71036,6 +71066,21 @@ components: - type title: Specific shell tool choice description: Forces the model to call the shell tool when a tool call is required. + CyberAccessProgramEnum: + type: string + enum: + - standard + - daybreak_blue + - daybreak_red + AccessProgramsParam: + properties: + cyber: + $ref: '#/components/schemas/CyberAccessProgramEnum' + description: The Cyber access program to use for this request. Supported values are `standard`, `daybreak_blue`, and `daybreak_red`. If omitted, the API resolves the program from the model's Cyber tier and your organization and project access, subject to model-specific eligibility restrictions. By default, models without a Cyber tier use Standard. Blue-tier models use Daybreak Blue when authorized; otherwise they fall back to Standard unless the model requires Daybreak access. Red-tier models use Daybreak Red and require authorization. Requests that require unavailable Daybreak access return 403. An implicit Standard fallback is represented by null in the response's access_programs field, rather than an explicit Standard selection. + additionalProperties: false + type: object + required: [] + description: Domain-specific access programs to use for this request. ResponsePromptCacheOptionsParam: properties: ttl: @@ -71089,6 +71134,14 @@ components: type: object required: - type + AccessProgramsBody: + properties: + cyber: + $ref: '#/components/schemas/CyberAccessProgramEnum' + description: The effective Cyber access program used for this response. + type: object + required: + - cyber PromptCacheOptions: properties: ttl: @@ -90828,6 +90881,10 @@ components: - cancelled - queued - incomplete + access_programs: + anyOf: + - $ref: '#/components/schemas/BetaAccessProgramsBody' + - type: 'null' created_at: type: number format: unixtime @@ -90940,6 +90997,7 @@ components: type: integer - type: 'null' required: + - access_programs - id - object - created_at @@ -91232,6 +91290,20 @@ components: - empty_image_file - failed_to_download_image - image_file_not_found + BetaAccessProgramsBody: + properties: + cyber: + $ref: '#/components/schemas/BetaCyberAccessProgramEnum' + description: The effective Cyber access program used for this response. + type: object + required: + - cyber + BetaCyberAccessProgramEnum: + type: string + enum: + - standard + - daybreak_blue + - daybreak_red BetaServiceTierResponses: anyOf: - type: string @@ -92815,6 +92887,7 @@ components: "response": { "id": "resp_67ccfcdd16748190a91872c75d38539e09e4d4aac714747c", "object": "response", + "access_programs": null, "created_at": 1741487325, "status": "in_progress", "completed_at": null, @@ -93343,6 +93416,7 @@ components: "response": { "id": "resp_67ccfcdd16748190a91872c75d38539e09e4d4aac714747c", "object": "response", + "access_programs": null, "created_at": 1741487325, "status": "in_progress", "completed_at": null, @@ -93534,6 +93608,7 @@ components: "response": { "id": "resp_123", "object": "response", + "access_programs": null, "created_at": 1740855869, "status": "completed", "completed_at": 1740855870, @@ -93999,6 +94074,7 @@ components: "response": { "id": "resp_123", "object": "response", + "access_programs": null, "created_at": 1740855869, "status": "incomplete", "completed_at": null, @@ -94066,6 +94142,7 @@ components: "response": { "id": "resp_123", "object": "response", + "access_programs": null, "created_at": 1740855869, "status": "failed", "completed_at": null, @@ -95987,6 +96064,8 @@ components: - $ref: '#/components/schemas/BetaResponseProperties' - type: object properties: + access_programs: + $ref: '#/components/schemas/BetaAccessProgramsParam' prompt_cache_options: $ref: '#/components/schemas/BetaResponsePromptCacheOptionsParam' service_tier: @@ -96211,6 +96290,15 @@ components: required: [] title: Prompt cache options description: Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for current details. + BetaAccessProgramsParam: + properties: + cyber: + $ref: '#/components/schemas/BetaCyberAccessProgramEnum' + description: The Cyber access program to use for this request. Supported values are `standard`, `daybreak_blue`, and `daybreak_red`. If omitted, the API resolves the program from the model's Cyber tier and your organization and project access, subject to model-specific eligibility restrictions. By default, models without a Cyber tier use Standard. Blue-tier models use Daybreak Blue when authorized; otherwise they fall back to Standard unless the model requires Daybreak access. Red-tier models use Daybreak Red and require authorization. Requests that require unavailable Daybreak access return 403. An implicit Standard fallback is represented by null in the response's access_programs field, rather than an explicit Standard selection. + additionalProperties: false + type: object + required: [] + description: Domain-specific access programs to use for this request. BetaCreateModelResponseProperties: allOf: - $ref: '#/components/schemas/BetaModelResponseProperties' diff --git a/lib/openai/models/beta/beta_response.rb b/lib/openai/models/beta/beta_response.rb index 678157a2f..133a74092 100644 --- a/lib/openai/models/beta/beta_response.rb +++ b/lib/openai/models/beta/beta_response.rb @@ -13,6 +13,11 @@ class BetaResponse < OpenAI::Internal::Type::BaseModel # @return [String] required :id, String + # @!attribute access_programs + # + # @return [OpenAI::Models::Beta::BetaResponse::AccessPrograms, nil] + required :access_programs, -> { OpenAI::Beta::BetaResponse::AccessPrograms }, nil?: true + # @!attribute created_at # Unix timestamp (in seconds) of when this Response was created. # @@ -353,10 +358,12 @@ class BetaResponse < OpenAI::Internal::Type::BaseModel # @return [String, nil] optional :user, String - # @!method initialize(id:, created_at:, error:, incomplete_details:, instructions:, metadata:, model:, output:, parallel_tool_calls:, temperature:, tool_choice:, tools:, top_p:, background: nil, completed_at: nil, conversation: nil, max_output_tokens: nil, max_tool_calls: nil, moderation: nil, previous_response_id: nil, prompt: nil, prompt_cache_diagnostics: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, status: nil, text: nil, top_logprobs: nil, truncation: nil, usage: nil, user: nil, object: :response) + # @!method initialize(id:, access_programs:, created_at:, error:, incomplete_details:, instructions:, metadata:, model:, output:, parallel_tool_calls:, temperature:, tool_choice:, tools:, top_p:, background: nil, completed_at: nil, conversation: nil, max_output_tokens: nil, max_tool_calls: nil, moderation: nil, previous_response_id: nil, prompt: nil, prompt_cache_diagnostics: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, status: nil, text: nil, top_logprobs: nil, truncation: nil, usage: nil, user: nil, object: :response) # @param id [String] # Unique identifier for this Response. # + # @param access_programs [OpenAI::Models::Beta::BetaResponse::AccessPrograms, nil] + # # @param created_at [Float] # Unix timestamp (in seconds) of when this Response was created. # @@ -587,6 +594,33 @@ class BetaResponse < OpenAI::Internal::Type::BaseModel # @param object [Symbol, :response] # The object type of this resource - always set to `response`. + # @see OpenAI::Models::Beta::BetaResponse#access_programs + class AccessPrograms < OpenAI::Internal::Type::BaseModel + # @!attribute cyber + # The effective Cyber access program used for this response. + # + # @return [Symbol, OpenAI::Models::Beta::BetaResponse::AccessPrograms::Cyber] + required :cyber, enum: -> { OpenAI::Beta::BetaResponse::AccessPrograms::Cyber } + + # @!method initialize(cyber:) + # @param cyber [Symbol, OpenAI::Models::Beta::BetaResponse::AccessPrograms::Cyber] + # The effective Cyber access program used for this response. + + # The effective Cyber access program used for this response. + # + # @see OpenAI::Models::Beta::BetaResponse::AccessPrograms#cyber + module Cyber + extend OpenAI::Internal::Type::Enum + + STANDARD = :standard + DAYBREAK_BLUE = :daybreak_blue + DAYBREAK_RED = :daybreak_red + + # @!method self.values + # @return [Array] + end + end + # @see OpenAI::Models::Beta::BetaResponse#incomplete_details class IncompleteDetails < OpenAI::Internal::Type::BaseModel # @!attribute reason diff --git a/lib/openai/models/beta/beta_responses_client_event.rb b/lib/openai/models/beta/beta_responses_client_event.rb index 77594e55e..d7d9d2857 100644 --- a/lib/openai/models/beta/beta_responses_client_event.rb +++ b/lib/openai/models/beta/beta_responses_client_event.rb @@ -61,6 +61,12 @@ class ResponseCreate < OpenAI::Internal::Type::BaseModel # @return [Symbol, :"response.create"] required :type, const: :"response.create" + # @!attribute access_programs + # Domain-specific access programs to use for this request. + # + # @return [OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::AccessPrograms, nil] + optional :access_programs, -> { OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::AccessPrograms } + # @!attribute background # Whether to run the model response in the background. # [Learn more](https://developers.openai.com/api/docs/guides/background). @@ -476,7 +482,7 @@ class ResponseCreate < OpenAI::Internal::Type::BaseModel # @return [String, nil] optional :user, String - # @!method initialize(background: nil, context_management: nil, conversation: nil, include: nil, input: nil, instructions: nil, max_output_tokens: nil, max_tool_calls: nil, metadata: nil, model: nil, moderation: nil, multi_agent: nil, parallel_tool_calls: nil, previous_response_id: nil, prompt: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, store: nil, stream: nil, stream_id: nil, stream_options: nil, temperature: nil, text: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, truncation: nil, user: nil, type: :"response.create") + # @!method initialize(access_programs: nil, background: nil, context_management: nil, conversation: nil, include: nil, input: nil, instructions: nil, max_output_tokens: nil, max_tool_calls: nil, metadata: nil, model: nil, moderation: nil, multi_agent: nil, parallel_tool_calls: nil, previous_response_id: nil, prompt: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, store: nil, stream: nil, stream_id: nil, stream_options: nil, temperature: nil, text: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, truncation: nil, user: nil, type: :"response.create") # Client event for creating a response over a persistent WebSocket connection. # This payload uses the same top-level fields as `POST /v1/responses`, plus # WebSocket-only envelope metadata. @@ -487,6 +493,9 @@ class ResponseCreate < OpenAI::Internal::Type::BaseModel # - `background` is not supported over WebSocket. # - `stream_id` is WebSocket-only and is not part of `POST /v1/responses`. # + # @param access_programs [OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::AccessPrograms] + # Domain-specific access programs to use for this request. + # # @param background [Boolean, nil] # Whether to run the model response in the background. # [Learn more](https://developers.openai.com/api/docs/guides/background). @@ -752,6 +761,66 @@ class ResponseCreate < OpenAI::Internal::Type::BaseModel # # @param type [Symbol, :"response.create"] # The type of the client event. Always `response.create`. + + # @see OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate#access_programs + class AccessPrograms < OpenAI::Internal::Type::BaseModel + # @!attribute cyber + # The Cyber access program to use for this request. Supported values are + # `standard`, `daybreak_blue`, and `daybreak_red`. If omitted, the API resolves + # the program from the model's Cyber tier and your organization and project + # access, subject to model-specific eligibility restrictions. By default, models + # without a Cyber tier use Standard. Blue-tier models use Daybreak Blue when + # authorized; otherwise they fall back to Standard unless the model requires + # Daybreak access. Red-tier models use Daybreak Red and require authorization. + # Requests that require unavailable Daybreak access return 403. An implicit + # Standard fallback is represented by null in the response's access_programs + # field, rather than an explicit Standard selection. + # + # @return [Symbol, OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::AccessPrograms::Cyber, nil] + optional( + :cyber, + enum: -> { OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::AccessPrograms::Cyber } + ) + + # @!method initialize(cyber: nil) + # Domain-specific access programs to use for this request. + # + # @param cyber [Symbol, OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::AccessPrograms::Cyber] + # The Cyber access program to use for this request. Supported values are + # `standard`, `daybreak_blue`, and `daybreak_red`. If omitted, the API resolves + # the program from the model's Cyber tier and your organization and project + # access, subject to model-specific eligibility restrictions. By default, models + # without a Cyber tier use Standard. Blue-tier models use Daybreak Blue when + # authorized; otherwise they fall back to Standard unless the model requires + # Daybreak access. Red-tier models use Daybreak Red and require authorization. + # Requests that require unavailable Daybreak access return 403. An implicit + # Standard fallback is represented by null in the response's access_programs + # field, rather than an explicit Standard selection. + + # The Cyber access program to use for this request. Supported values are + # `standard`, `daybreak_blue`, and `daybreak_red`. If omitted, the API resolves + # the program from the model's Cyber tier and your organization and project + # access, subject to model-specific eligibility restrictions. By default, models + # without a Cyber tier use Standard. Blue-tier models use Daybreak Blue when + # authorized; otherwise they fall back to Standard unless the model requires + # Daybreak access. Red-tier models use Daybreak Red and require authorization. + # Requests that require unavailable Daybreak access return 403. An implicit + # Standard fallback is represented by null in the response's access_programs + # field, rather than an explicit Standard selection. + # + # @see OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::AccessPrograms#cyber + module Cyber + extend OpenAI::Internal::Type::Enum + + STANDARD = :standard + DAYBREAK_BLUE = :daybreak_blue + DAYBREAK_RED = :daybreak_red + + # @!method self.values + # @return [Array] + end + end + class ContextManagement < OpenAI::Internal::Type::BaseModel # @!attribute type # The context management entry type. Currently only 'compaction' is supported. diff --git a/lib/openai/models/beta/response_create_params.rb b/lib/openai/models/beta/response_create_params.rb index 9ed92afbe..b33b09e3e 100644 --- a/lib/openai/models/beta/response_create_params.rb +++ b/lib/openai/models/beta/response_create_params.rb @@ -10,6 +10,12 @@ class ResponseCreateParams < OpenAI::Internal::Type::BaseModel extend OpenAI::Internal::Type::RequestParameters::Converter include OpenAI::Internal::Type::RequestParameters + # @!attribute access_programs + # Domain-specific access programs to use for this request. + # + # @return [OpenAI::Models::Beta::ResponseCreateParams::AccessPrograms, nil] + optional :access_programs, -> { OpenAI::Beta::ResponseCreateParams::AccessPrograms } + # @!attribute background # Whether to run the model response in the background. # [Learn more](https://developers.openai.com/api/docs/guides/background). @@ -376,7 +382,10 @@ class ResponseCreateParams < OpenAI::Internal::Type::BaseModel # @return [Array, nil] optional :betas, -> { OpenAI::Internal::Type::ArrayOf[enum: OpenAI::Beta::ResponseCreateParams::Beta] } - # @!method initialize(background: nil, context_management: nil, conversation: nil, include: nil, input: nil, instructions: nil, max_output_tokens: nil, max_tool_calls: nil, metadata: nil, model: nil, moderation: nil, multi_agent: nil, parallel_tool_calls: nil, previous_response_id: nil, prompt: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, store: nil, stream_options: nil, temperature: nil, text: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, truncation: nil, user: nil, betas: nil, request_options: {}) + # @!method initialize(access_programs: nil, background: nil, context_management: nil, conversation: nil, include: nil, input: nil, instructions: nil, max_output_tokens: nil, max_tool_calls: nil, metadata: nil, model: nil, moderation: nil, multi_agent: nil, parallel_tool_calls: nil, previous_response_id: nil, prompt: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, store: nil, stream_options: nil, temperature: nil, text: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, truncation: nil, user: nil, betas: nil, request_options: {}) + # @param access_programs [OpenAI::Models::Beta::ResponseCreateParams::AccessPrograms] + # Domain-specific access programs to use for this request. + # # @param background [Boolean, nil] # Whether to run the model response in the background. # [Learn more](https://developers.openai.com/api/docs/guides/background). @@ -629,6 +638,61 @@ class ResponseCreateParams < OpenAI::Internal::Type::BaseModel # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] + class AccessPrograms < OpenAI::Internal::Type::BaseModel + # @!attribute cyber + # The Cyber access program to use for this request. Supported values are + # `standard`, `daybreak_blue`, and `daybreak_red`. If omitted, the API resolves + # the program from the model's Cyber tier and your organization and project + # access, subject to model-specific eligibility restrictions. By default, models + # without a Cyber tier use Standard. Blue-tier models use Daybreak Blue when + # authorized; otherwise they fall back to Standard unless the model requires + # Daybreak access. Red-tier models use Daybreak Red and require authorization. + # Requests that require unavailable Daybreak access return 403. An implicit + # Standard fallback is represented by null in the response's access_programs + # field, rather than an explicit Standard selection. + # + # @return [Symbol, OpenAI::Models::Beta::ResponseCreateParams::AccessPrograms::Cyber, nil] + optional :cyber, enum: -> { OpenAI::Beta::ResponseCreateParams::AccessPrograms::Cyber } + + # @!method initialize(cyber: nil) + # Domain-specific access programs to use for this request. + # + # @param cyber [Symbol, OpenAI::Models::Beta::ResponseCreateParams::AccessPrograms::Cyber] + # The Cyber access program to use for this request. Supported values are + # `standard`, `daybreak_blue`, and `daybreak_red`. If omitted, the API resolves + # the program from the model's Cyber tier and your organization and project + # access, subject to model-specific eligibility restrictions. By default, models + # without a Cyber tier use Standard. Blue-tier models use Daybreak Blue when + # authorized; otherwise they fall back to Standard unless the model requires + # Daybreak access. Red-tier models use Daybreak Red and require authorization. + # Requests that require unavailable Daybreak access return 403. An implicit + # Standard fallback is represented by null in the response's access_programs + # field, rather than an explicit Standard selection. + + # The Cyber access program to use for this request. Supported values are + # `standard`, `daybreak_blue`, and `daybreak_red`. If omitted, the API resolves + # the program from the model's Cyber tier and your organization and project + # access, subject to model-specific eligibility restrictions. By default, models + # without a Cyber tier use Standard. Blue-tier models use Daybreak Blue when + # authorized; otherwise they fall back to Standard unless the model requires + # Daybreak access. Red-tier models use Daybreak Red and require authorization. + # Requests that require unavailable Daybreak access return 403. An implicit + # Standard fallback is represented by null in the response's access_programs + # field, rather than an explicit Standard selection. + # + # @see OpenAI::Models::Beta::ResponseCreateParams::AccessPrograms#cyber + module Cyber + extend OpenAI::Internal::Type::Enum + + STANDARD = :standard + DAYBREAK_BLUE = :daybreak_blue + DAYBREAK_RED = :daybreak_red + + # @!method self.values + # @return [Array] + end + end + class ContextManagement < OpenAI::Internal::Type::BaseModel # @!attribute type # The context management entry type. Currently only 'compaction' is supported. diff --git a/lib/openai/models/responses/response.rb b/lib/openai/models/responses/response.rb index bde314d76..230b1fa4e 100644 --- a/lib/openai/models/responses/response.rb +++ b/lib/openai/models/responses/response.rb @@ -13,6 +13,11 @@ class Response < OpenAI::Internal::Type::BaseModel # @return [String] required :id, String + # @!attribute access_programs + # + # @return [OpenAI::Models::Responses::Response::AccessPrograms, nil] + required :access_programs, -> { OpenAI::Responses::Response::AccessPrograms }, nil?: true + # @!attribute created_at # Unix timestamp (in seconds) of when this Response was created. # @@ -374,10 +379,12 @@ def output_text texts.join end - # @!method initialize(id:, created_at:, error:, incomplete_details:, instructions:, metadata:, model:, output:, parallel_tool_calls:, temperature:, tool_choice:, tools:, top_p:, background: nil, completed_at: nil, conversation: nil, max_output_tokens: nil, max_tool_calls: nil, moderation: nil, previous_response_id: nil, prompt: nil, prompt_cache_diagnostics: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, status: nil, text: nil, top_logprobs: nil, truncation: nil, usage: nil, user: nil, object: :response) + # @!method initialize(id:, access_programs:, created_at:, error:, incomplete_details:, instructions:, metadata:, model:, output:, parallel_tool_calls:, temperature:, tool_choice:, tools:, top_p:, background: nil, completed_at: nil, conversation: nil, max_output_tokens: nil, max_tool_calls: nil, moderation: nil, previous_response_id: nil, prompt: nil, prompt_cache_diagnostics: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, status: nil, text: nil, top_logprobs: nil, truncation: nil, usage: nil, user: nil, object: :response) # @param id [String] # Unique identifier for this Response. # + # @param access_programs [OpenAI::Models::Responses::Response::AccessPrograms, nil] + # # @param created_at [Float] # Unix timestamp (in seconds) of when this Response was created. # @@ -608,6 +615,33 @@ def output_text # @param object [Symbol, :response] # The object type of this resource - always set to `response`. + # @see OpenAI::Models::Responses::Response#access_programs + class AccessPrograms < OpenAI::Internal::Type::BaseModel + # @!attribute cyber + # The effective Cyber access program used for this response. + # + # @return [Symbol, OpenAI::Models::Responses::Response::AccessPrograms::Cyber] + required :cyber, enum: -> { OpenAI::Responses::Response::AccessPrograms::Cyber } + + # @!method initialize(cyber:) + # @param cyber [Symbol, OpenAI::Models::Responses::Response::AccessPrograms::Cyber] + # The effective Cyber access program used for this response. + + # The effective Cyber access program used for this response. + # + # @see OpenAI::Models::Responses::Response::AccessPrograms#cyber + module Cyber + extend OpenAI::Internal::Type::Enum + + STANDARD = :standard + DAYBREAK_BLUE = :daybreak_blue + DAYBREAK_RED = :daybreak_red + + # @!method self.values + # @return [Array] + end + end + # @see OpenAI::Models::Responses::Response#incomplete_details class IncompleteDetails < OpenAI::Internal::Type::BaseModel # @!attribute reason diff --git a/lib/openai/models/responses/response_create_params.rb b/lib/openai/models/responses/response_create_params.rb index c7821dde2..5487ae61e 100644 --- a/lib/openai/models/responses/response_create_params.rb +++ b/lib/openai/models/responses/response_create_params.rb @@ -10,6 +10,12 @@ class ResponseCreateParams < OpenAI::Internal::Type::BaseModel extend OpenAI::Internal::Type::RequestParameters::Converter include OpenAI::Internal::Type::RequestParameters + # @!attribute access_programs + # Domain-specific access programs to use for this request. + # + # @return [OpenAI::Models::Responses::ResponseCreateParams::AccessPrograms, nil] + optional :access_programs, -> { OpenAI::Responses::ResponseCreateParams::AccessPrograms } + # @!attribute background # Whether to run the model response in the background. # [Learn more](https://developers.openai.com/api/docs/guides/background). @@ -379,7 +385,10 @@ class ResponseCreateParams < OpenAI::Internal::Type::BaseModel # @return [String, nil] optional :user, String - # @!method initialize(background: nil, context_management: nil, conversation: nil, include: nil, input: nil, instructions: nil, max_output_tokens: nil, max_tool_calls: nil, metadata: nil, model: nil, moderation: nil, parallel_tool_calls: nil, previous_response_id: nil, prompt: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, store: nil, stream_options: nil, temperature: nil, text: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, truncation: nil, user: nil, request_options: {}) + # @!method initialize(access_programs: nil, background: nil, context_management: nil, conversation: nil, include: nil, input: nil, instructions: nil, max_output_tokens: nil, max_tool_calls: nil, metadata: nil, model: nil, moderation: nil, parallel_tool_calls: nil, previous_response_id: nil, prompt: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, store: nil, stream_options: nil, temperature: nil, text: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, truncation: nil, user: nil, request_options: {}) + # @param access_programs [OpenAI::Models::Responses::ResponseCreateParams::AccessPrograms] + # Domain-specific access programs to use for this request. + # # @param background [Boolean, nil] # Whether to run the model response in the background. # [Learn more](https://developers.openai.com/api/docs/guides/background). @@ -627,6 +636,61 @@ class ResponseCreateParams < OpenAI::Internal::Type::BaseModel # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] + class AccessPrograms < OpenAI::Internal::Type::BaseModel + # @!attribute cyber + # The Cyber access program to use for this request. Supported values are + # `standard`, `daybreak_blue`, and `daybreak_red`. If omitted, the API resolves + # the program from the model's Cyber tier and your organization and project + # access, subject to model-specific eligibility restrictions. By default, models + # without a Cyber tier use Standard. Blue-tier models use Daybreak Blue when + # authorized; otherwise they fall back to Standard unless the model requires + # Daybreak access. Red-tier models use Daybreak Red and require authorization. + # Requests that require unavailable Daybreak access return 403. An implicit + # Standard fallback is represented by null in the response's access_programs + # field, rather than an explicit Standard selection. + # + # @return [Symbol, OpenAI::Models::Responses::ResponseCreateParams::AccessPrograms::Cyber, nil] + optional :cyber, enum: -> { OpenAI::Responses::ResponseCreateParams::AccessPrograms::Cyber } + + # @!method initialize(cyber: nil) + # Domain-specific access programs to use for this request. + # + # @param cyber [Symbol, OpenAI::Models::Responses::ResponseCreateParams::AccessPrograms::Cyber] + # The Cyber access program to use for this request. Supported values are + # `standard`, `daybreak_blue`, and `daybreak_red`. If omitted, the API resolves + # the program from the model's Cyber tier and your organization and project + # access, subject to model-specific eligibility restrictions. By default, models + # without a Cyber tier use Standard. Blue-tier models use Daybreak Blue when + # authorized; otherwise they fall back to Standard unless the model requires + # Daybreak access. Red-tier models use Daybreak Red and require authorization. + # Requests that require unavailable Daybreak access return 403. An implicit + # Standard fallback is represented by null in the response's access_programs + # field, rather than an explicit Standard selection. + + # The Cyber access program to use for this request. Supported values are + # `standard`, `daybreak_blue`, and `daybreak_red`. If omitted, the API resolves + # the program from the model's Cyber tier and your organization and project + # access, subject to model-specific eligibility restrictions. By default, models + # without a Cyber tier use Standard. Blue-tier models use Daybreak Blue when + # authorized; otherwise they fall back to Standard unless the model requires + # Daybreak access. Red-tier models use Daybreak Red and require authorization. + # Requests that require unavailable Daybreak access return 403. An implicit + # Standard fallback is represented by null in the response's access_programs + # field, rather than an explicit Standard selection. + # + # @see OpenAI::Models::Responses::ResponseCreateParams::AccessPrograms#cyber + module Cyber + extend OpenAI::Internal::Type::Enum + + STANDARD = :standard + DAYBREAK_BLUE = :daybreak_blue + DAYBREAK_RED = :daybreak_red + + # @!method self.values + # @return [Array] + end + end + class ContextManagement < OpenAI::Internal::Type::BaseModel # @!attribute type # The context management entry type. Currently only 'compaction' is supported. diff --git a/lib/openai/models/responses/responses_client_event.rb b/lib/openai/models/responses/responses_client_event.rb index 5355d0472..0cb9d2578 100644 --- a/lib/openai/models/responses/responses_client_event.rb +++ b/lib/openai/models/responses/responses_client_event.rb @@ -56,6 +56,12 @@ class ResponseCreate < OpenAI::Internal::Type::BaseModel # @return [Symbol, :"response.create"] required :type, const: :"response.create" + # @!attribute access_programs + # Domain-specific access programs to use for this request. + # + # @return [OpenAI::Models::Responses::ResponsesClientEvent::ResponseCreate::AccessPrograms, nil] + optional :access_programs, -> { OpenAI::Responses::ResponsesClientEvent::ResponseCreate::AccessPrograms } + # @!attribute background # Whether to run the model response in the background. # [Learn more](https://developers.openai.com/api/docs/guides/background). @@ -457,7 +463,7 @@ class ResponseCreate < OpenAI::Internal::Type::BaseModel # @return [String, nil] optional :user, String - # @!method initialize(background: nil, context_management: nil, conversation: nil, include: nil, input: nil, instructions: nil, max_output_tokens: nil, max_tool_calls: nil, metadata: nil, model: nil, moderation: nil, parallel_tool_calls: nil, previous_response_id: nil, prompt: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, store: nil, stream: nil, stream_id: nil, stream_options: nil, temperature: nil, text: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, truncation: nil, user: nil, type: :"response.create") + # @!method initialize(access_programs: nil, background: nil, context_management: nil, conversation: nil, include: nil, input: nil, instructions: nil, max_output_tokens: nil, max_tool_calls: nil, metadata: nil, model: nil, moderation: nil, parallel_tool_calls: nil, previous_response_id: nil, prompt: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, store: nil, stream: nil, stream_id: nil, stream_options: nil, temperature: nil, text: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, truncation: nil, user: nil, type: :"response.create") # Client event for creating a response over a persistent WebSocket connection. # This payload uses the same top-level fields as `POST /v1/responses`, plus # WebSocket-only envelope metadata. @@ -468,6 +474,9 @@ class ResponseCreate < OpenAI::Internal::Type::BaseModel # - `background` is not supported over WebSocket. # - `stream_id` is WebSocket-only and is not part of `POST /v1/responses`. # + # @param access_programs [OpenAI::Models::Responses::ResponsesClientEvent::ResponseCreate::AccessPrograms] + # Domain-specific access programs to use for this request. + # # @param background [Boolean, nil] # Whether to run the model response in the background. # [Learn more](https://developers.openai.com/api/docs/guides/background). @@ -730,6 +739,66 @@ class ResponseCreate < OpenAI::Internal::Type::BaseModel # # @param type [Symbol, :"response.create"] # The type of the client event. Always `response.create`. + + # @see OpenAI::Models::Responses::ResponsesClientEvent::ResponseCreate#access_programs + class AccessPrograms < OpenAI::Internal::Type::BaseModel + # @!attribute cyber + # The Cyber access program to use for this request. Supported values are + # `standard`, `daybreak_blue`, and `daybreak_red`. If omitted, the API resolves + # the program from the model's Cyber tier and your organization and project + # access, subject to model-specific eligibility restrictions. By default, models + # without a Cyber tier use Standard. Blue-tier models use Daybreak Blue when + # authorized; otherwise they fall back to Standard unless the model requires + # Daybreak access. Red-tier models use Daybreak Red and require authorization. + # Requests that require unavailable Daybreak access return 403. An implicit + # Standard fallback is represented by null in the response's access_programs + # field, rather than an explicit Standard selection. + # + # @return [Symbol, OpenAI::Models::Responses::ResponsesClientEvent::ResponseCreate::AccessPrograms::Cyber, nil] + optional( + :cyber, + enum: -> { OpenAI::Responses::ResponsesClientEvent::ResponseCreate::AccessPrograms::Cyber } + ) + + # @!method initialize(cyber: nil) + # Domain-specific access programs to use for this request. + # + # @param cyber [Symbol, OpenAI::Models::Responses::ResponsesClientEvent::ResponseCreate::AccessPrograms::Cyber] + # The Cyber access program to use for this request. Supported values are + # `standard`, `daybreak_blue`, and `daybreak_red`. If omitted, the API resolves + # the program from the model's Cyber tier and your organization and project + # access, subject to model-specific eligibility restrictions. By default, models + # without a Cyber tier use Standard. Blue-tier models use Daybreak Blue when + # authorized; otherwise they fall back to Standard unless the model requires + # Daybreak access. Red-tier models use Daybreak Red and require authorization. + # Requests that require unavailable Daybreak access return 403. An implicit + # Standard fallback is represented by null in the response's access_programs + # field, rather than an explicit Standard selection. + + # The Cyber access program to use for this request. Supported values are + # `standard`, `daybreak_blue`, and `daybreak_red`. If omitted, the API resolves + # the program from the model's Cyber tier and your organization and project + # access, subject to model-specific eligibility restrictions. By default, models + # without a Cyber tier use Standard. Blue-tier models use Daybreak Blue when + # authorized; otherwise they fall back to Standard unless the model requires + # Daybreak access. Red-tier models use Daybreak Red and require authorization. + # Requests that require unavailable Daybreak access return 403. An implicit + # Standard fallback is represented by null in the response's access_programs + # field, rather than an explicit Standard selection. + # + # @see OpenAI::Models::Responses::ResponsesClientEvent::ResponseCreate::AccessPrograms#cyber + module Cyber + extend OpenAI::Internal::Type::Enum + + STANDARD = :standard + DAYBREAK_BLUE = :daybreak_blue + DAYBREAK_RED = :daybreak_red + + # @!method self.values + # @return [Array] + end + end + class ContextManagement < OpenAI::Internal::Type::BaseModel # @!attribute type # The context management entry type. Currently only 'compaction' is supported. diff --git a/lib/openai/resources/beta/responses.rb b/lib/openai/resources/beta/responses.rb index 5ae6d2cb3..a026e297d 100644 --- a/lib/openai/resources/beta/responses.rb +++ b/lib/openai/resources/beta/responses.rb @@ -27,7 +27,10 @@ class Responses # [file search](https://developers.openai.com/api/docs/guides/tools-file-search) # to use your own data as input for the model's response. # - # @overload create(background: nil, context_management: nil, conversation: nil, include: nil, input: nil, instructions: nil, max_output_tokens: nil, max_tool_calls: nil, metadata: nil, model: nil, moderation: nil, multi_agent: nil, parallel_tool_calls: nil, previous_response_id: nil, prompt: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, store: nil, stream_options: nil, temperature: nil, text: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, truncation: nil, user: nil, betas: nil, request_options: {}) + # @overload create(access_programs: nil, background: nil, context_management: nil, conversation: nil, include: nil, input: nil, instructions: nil, max_output_tokens: nil, max_tool_calls: nil, metadata: nil, model: nil, moderation: nil, multi_agent: nil, parallel_tool_calls: nil, previous_response_id: nil, prompt: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, store: nil, stream_options: nil, temperature: nil, text: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, truncation: nil, user: nil, betas: nil, request_options: {}) + # + # @param access_programs [OpenAI::Models::Beta::ResponseCreateParams::AccessPrograms] + # Body param: Domain-specific access programs to use for this request. # # @param background [Boolean, nil] # Body param: Whether to run the model response in the background. @@ -325,7 +328,10 @@ def create(params = {}) # [file search](https://developers.openai.com/api/docs/guides/tools-file-search) # to use your own data as input for the model's response. # - # @overload stream_raw(background: nil, context_management: nil, conversation: nil, include: nil, input: nil, instructions: nil, max_output_tokens: nil, max_tool_calls: nil, metadata: nil, model: nil, moderation: nil, multi_agent: nil, parallel_tool_calls: nil, previous_response_id: nil, prompt: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, store: nil, stream_options: nil, temperature: nil, text: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, truncation: nil, user: nil, betas: nil, request_options: {}) + # @overload stream_raw(access_programs: nil, background: nil, context_management: nil, conversation: nil, include: nil, input: nil, instructions: nil, max_output_tokens: nil, max_tool_calls: nil, metadata: nil, model: nil, moderation: nil, multi_agent: nil, parallel_tool_calls: nil, previous_response_id: nil, prompt: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, store: nil, stream_options: nil, temperature: nil, text: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, truncation: nil, user: nil, betas: nil, request_options: {}) + # + # @param access_programs [OpenAI::Models::Beta::ResponseCreateParams::AccessPrograms] + # Body param: Domain-specific access programs to use for this request. # # @param background [Boolean, nil] # Body param: Whether to run the model response in the background. diff --git a/lib/openai/resources/responses.rb b/lib/openai/resources/responses.rb index ea5ab6e42..318ab5b5c 100644 --- a/lib/openai/resources/responses.rb +++ b/lib/openai/resources/responses.rb @@ -28,7 +28,10 @@ class Responses # [file search](https://developers.openai.com/api/docs/guides/tools-file-search) # to use your own data as input for the model's response. # - # @overload create(background: nil, context_management: nil, conversation: nil, include: nil, input: nil, instructions: nil, max_output_tokens: nil, max_tool_calls: nil, metadata: nil, model: nil, moderation: nil, parallel_tool_calls: nil, previous_response_id: nil, prompt: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, store: nil, stream_options: nil, temperature: nil, text: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, truncation: nil, user: nil, request_options: {}) + # @overload create(access_programs: nil, background: nil, context_management: nil, conversation: nil, include: nil, input: nil, instructions: nil, max_output_tokens: nil, max_tool_calls: nil, metadata: nil, model: nil, moderation: nil, parallel_tool_calls: nil, previous_response_id: nil, prompt: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, store: nil, stream_options: nil, temperature: nil, text: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, truncation: nil, user: nil, request_options: {}) + # + # @param access_programs [OpenAI::Models::Responses::ResponseCreateParams::AccessPrograms] + # Domain-specific access programs to use for this request. # # @param background [Boolean, nil] # Whether to run the model response in the background. @@ -305,6 +308,10 @@ def create(params = {}) end # Creates or resumes a streaming response and parses structured outputs. + # @overload stream(access_programs: nil, **params) + # @param access_programs [OpenAI::Models::Responses::ResponseCreateParams::AccessPrograms] + # Domain-specific access programs to use for this request. + # @param params [Hash{Symbol=>Object}] Other response creation or retrieval parameters. def stream(params) parsed, options = OpenAI::Responses::ResponseCreateParams.dump_request(params) starting_after, response_id = parsed.values_at(:starting_after, :response_id) diff --git a/rbi/openai/models/beta/beta_response.rbi b/rbi/openai/models/beta/beta_response.rbi index bc2c1b49b..fdb061465 100644 --- a/rbi/openai/models/beta/beta_response.rbi +++ b/rbi/openai/models/beta/beta_response.rbi @@ -20,6 +20,12 @@ module OpenAI sig { returns(String) } attr_accessor :id + sig { returns(T.nilable(OpenAI::Beta::BetaResponse::AccessPrograms)) } + attr_reader :access_programs + + sig { params(access_programs: T.nilable(OpenAI::Beta::BetaResponse::AccessPrograms::OrHash)).void } + attr_writer :access_programs + # Unix timestamp (in seconds) of when this Response was created. sig { returns(Float) } attr_accessor :created_at @@ -335,6 +341,8 @@ module OpenAI id: String, + access_programs: T.nilable(OpenAI::Beta::BetaResponse::AccessPrograms::OrHash), + created_at: Float, error: T.nilable(OpenAI::Beta::BetaResponseError::OrHash), @@ -478,6 +486,8 @@ module OpenAI # Unique identifier for this Response. id:, + access_programs:, + # Unix timestamp (in seconds) of when this Response was created. created_at:, @@ -715,6 +725,7 @@ module OpenAI override.returns( { id: String, + access_programs: T.nilable(OpenAI::Beta::BetaResponse::AccessPrograms), created_at: Float, error: T.nilable(OpenAI::Beta::BetaResponseError), incomplete_details: T.nilable(OpenAI::Beta::BetaResponse::IncompleteDetails), @@ -755,6 +766,58 @@ module OpenAI def to_hash end + class AccessPrograms < OpenAI::Internal::Type::BaseModel + OrHash = T.type_alias do + T.any( + OpenAI::Beta::BetaResponse::AccessPrograms, + OpenAI::Internal::AnyHash + ) + end + + # The effective Cyber access program used for this response. + sig { returns(OpenAI::Beta::BetaResponse::AccessPrograms::Cyber::TaggedSymbol) } + attr_accessor :cyber + + sig do + params( + + cyber: OpenAI::Beta::BetaResponse::AccessPrograms::Cyber::OrSymbol + ) + .returns(T.attached_class) + end + def self.new( + + # The effective Cyber access program used for this response. + + cyber: + ) + end + + sig do + override.returns( + {cyber: OpenAI::Beta::BetaResponse::AccessPrograms::Cyber::TaggedSymbol} + ) + end + def to_hash + end + + # The effective Cyber access program used for this response. + module Cyber + extend OpenAI::Internal::Type::Enum + + TaggedSymbol = T.type_alias { T.all(Symbol, OpenAI::Beta::BetaResponse::AccessPrograms::Cyber) } + OrSymbol = T.type_alias { T.any(Symbol, String) } + + STANDARD = T.let(:standard, OpenAI::Beta::BetaResponse::AccessPrograms::Cyber::TaggedSymbol) + DAYBREAK_BLUE = T.let(:daybreak_blue, OpenAI::Beta::BetaResponse::AccessPrograms::Cyber::TaggedSymbol) + DAYBREAK_RED = T.let(:daybreak_red, OpenAI::Beta::BetaResponse::AccessPrograms::Cyber::TaggedSymbol) + + sig { override.returns(T::Array[OpenAI::Beta::BetaResponse::AccessPrograms::Cyber::TaggedSymbol]) } + def self.values + end + end + end + class IncompleteDetails < OpenAI::Internal::Type::BaseModel OrHash = T.type_alias do T.any( diff --git a/rbi/openai/models/beta/beta_responses_client_event.rbi b/rbi/openai/models/beta/beta_responses_client_event.rbi index 8dbf066fc..196562e83 100644 --- a/rbi/openai/models/beta/beta_responses_client_event.rbi +++ b/rbi/openai/models/beta/beta_responses_client_event.rbi @@ -31,6 +31,15 @@ module OpenAI sig { returns(Symbol) } attr_accessor :type + # Domain-specific access programs to use for this request. + sig { returns(T.nilable(OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::AccessPrograms)) } + attr_reader :access_programs + + sig { + params(access_programs: OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::AccessPrograms::OrHash).void + } + attr_writer :access_programs + # Whether to run the model response in the background. # [Learn more](https://developers.openai.com/api/docs/guides/background). sig { returns(T.nilable(T::Boolean)) } @@ -484,6 +493,8 @@ module OpenAI sig do params( + access_programs: OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::AccessPrograms::OrHash, + background: T.nilable(T::Boolean), context_management: T.nilable( @@ -589,6 +600,9 @@ module OpenAI end def self.new( + # Domain-specific access programs to use for this request. + access_programs: nil, + # Whether to run the model response in the background. # [Learn more](https://developers.openai.com/api/docs/guides/background). background: nil, @@ -862,6 +876,7 @@ module OpenAI override.returns( { type: Symbol, + access_programs: T.nilable(OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::AccessPrograms), background: T.nilable(T::Boolean), context_management: T.nilable( T::Array[OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::ContextManagement] @@ -940,6 +955,115 @@ module OpenAI def to_hash end + class AccessPrograms < OpenAI::Internal::Type::BaseModel + OrHash = T.type_alias do + T.any( + OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::AccessPrograms, + OpenAI::Internal::AnyHash + ) + end + + # The Cyber access program to use for this request. Supported values are + # `standard`, `daybreak_blue`, and `daybreak_red`. If omitted, the API resolves + # the program from the model's Cyber tier and your organization and project + # access, subject to model-specific eligibility restrictions. By default, models + # without a Cyber tier use Standard. Blue-tier models use Daybreak Blue when + # authorized; otherwise they fall back to Standard unless the model requires + # Daybreak access. Red-tier models use Daybreak Red and require authorization. + # Requests that require unavailable Daybreak access return 403. An implicit + # Standard fallback is represented by null in the response's access_programs + # field, rather than an explicit Standard selection. + sig { + returns( + T.nilable(OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::AccessPrograms::Cyber::OrSymbol) + ) + } + attr_reader :cyber + + sig { + params(cyber: OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::AccessPrograms::Cyber::OrSymbol) + .void + } + attr_writer :cyber + + # Domain-specific access programs to use for this request. + sig do + params( + + cyber: OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::AccessPrograms::Cyber::OrSymbol + ) + .returns(T.attached_class) + end + def self.new( + + # The Cyber access program to use for this request. Supported values are + # `standard`, `daybreak_blue`, and `daybreak_red`. If omitted, the API resolves + # the program from the model's Cyber tier and your organization and project + # access, subject to model-specific eligibility restrictions. By default, models + # without a Cyber tier use Standard. Blue-tier models use Daybreak Blue when + # authorized; otherwise they fall back to Standard unless the model requires + # Daybreak access. Red-tier models use Daybreak Red and require authorization. + # Requests that require unavailable Daybreak access return 403. An implicit + # Standard fallback is represented by null in the response's access_programs + # field, rather than an explicit Standard selection. + + cyber: nil + ) + end + + sig do + override.returns( + { + cyber: T.nilable( + OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::AccessPrograms::Cyber::OrSymbol + ) + } + ) + end + def to_hash + end + + # The Cyber access program to use for this request. Supported values are + # `standard`, `daybreak_blue`, and `daybreak_red`. If omitted, the API resolves + # the program from the model's Cyber tier and your organization and project + # access, subject to model-specific eligibility restrictions. By default, models + # without a Cyber tier use Standard. Blue-tier models use Daybreak Blue when + # authorized; otherwise they fall back to Standard unless the model requires + # Daybreak access. Red-tier models use Daybreak Red and require authorization. + # Requests that require unavailable Daybreak access return 403. An implicit + # Standard fallback is represented by null in the response's access_programs + # field, rather than an explicit Standard selection. + module Cyber + extend OpenAI::Internal::Type::Enum + + TaggedSymbol = T.type_alias { + T.all(Symbol, OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::AccessPrograms::Cyber) + } + OrSymbol = T.type_alias { T.any(Symbol, String) } + + STANDARD = T.let( + :standard, + OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::AccessPrograms::Cyber::TaggedSymbol + ) + DAYBREAK_BLUE = T.let( + :daybreak_blue, + OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::AccessPrograms::Cyber::TaggedSymbol + ) + DAYBREAK_RED = T.let( + :daybreak_red, + OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::AccessPrograms::Cyber::TaggedSymbol + ) + + sig { + override.returns( + T::Array[OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::AccessPrograms::Cyber::TaggedSymbol] + ) + } + def self.values + end + end + end + class ContextManagement < OpenAI::Internal::Type::BaseModel OrHash = T.type_alias do T.any( diff --git a/rbi/openai/models/beta/response_create_params.rbi b/rbi/openai/models/beta/response_create_params.rbi index 3afa92b1c..060853039 100644 --- a/rbi/openai/models/beta/response_create_params.rbi +++ b/rbi/openai/models/beta/response_create_params.rbi @@ -17,6 +17,13 @@ module OpenAI ) end + # Domain-specific access programs to use for this request. + sig { returns(T.nilable(OpenAI::Beta::ResponseCreateParams::AccessPrograms)) } + attr_reader :access_programs + + sig { params(access_programs: OpenAI::Beta::ResponseCreateParams::AccessPrograms::OrHash).void } + attr_writer :access_programs + # Whether to run the model response in the background. # [Learn more](https://developers.openai.com/api/docs/guides/background). sig { returns(T.nilable(T::Boolean)) } @@ -421,6 +428,8 @@ module OpenAI sig do params( + access_programs: OpenAI::Beta::ResponseCreateParams::AccessPrograms::OrHash, + background: T.nilable(T::Boolean), context_management: T.nilable(T::Array[OpenAI::Beta::ResponseCreateParams::ContextManagement::OrHash]), @@ -520,6 +529,9 @@ module OpenAI end def self.new( + # Domain-specific access programs to use for this request. + access_programs: nil, + # Whether to run the model response in the background. # [Learn more](https://developers.openai.com/api/docs/guides/background). background: nil, @@ -777,6 +789,7 @@ module OpenAI sig do override.returns( { + access_programs: OpenAI::Beta::ResponseCreateParams::AccessPrograms, background: T.nilable(T::Boolean), context_management: T.nilable(T::Array[OpenAI::Beta::ResponseCreateParams::ContextManagement]), conversation: T.nilable(T.any(String, OpenAI::Beta::BetaResponseConversationParam)), @@ -845,6 +858,92 @@ module OpenAI def to_hash end + class AccessPrograms < OpenAI::Internal::Type::BaseModel + OrHash = T.type_alias do + T.any( + OpenAI::Beta::ResponseCreateParams::AccessPrograms, + OpenAI::Internal::AnyHash + ) + end + + # The Cyber access program to use for this request. Supported values are + # `standard`, `daybreak_blue`, and `daybreak_red`. If omitted, the API resolves + # the program from the model's Cyber tier and your organization and project + # access, subject to model-specific eligibility restrictions. By default, models + # without a Cyber tier use Standard. Blue-tier models use Daybreak Blue when + # authorized; otherwise they fall back to Standard unless the model requires + # Daybreak access. Red-tier models use Daybreak Red and require authorization. + # Requests that require unavailable Daybreak access return 403. An implicit + # Standard fallback is represented by null in the response's access_programs + # field, rather than an explicit Standard selection. + sig { returns(T.nilable(OpenAI::Beta::ResponseCreateParams::AccessPrograms::Cyber::OrSymbol)) } + attr_reader :cyber + + sig { params(cyber: OpenAI::Beta::ResponseCreateParams::AccessPrograms::Cyber::OrSymbol).void } + attr_writer :cyber + + # Domain-specific access programs to use for this request. + sig do + params( + + cyber: OpenAI::Beta::ResponseCreateParams::AccessPrograms::Cyber::OrSymbol + ) + .returns(T.attached_class) + end + def self.new( + + # The Cyber access program to use for this request. Supported values are + # `standard`, `daybreak_blue`, and `daybreak_red`. If omitted, the API resolves + # the program from the model's Cyber tier and your organization and project + # access, subject to model-specific eligibility restrictions. By default, models + # without a Cyber tier use Standard. Blue-tier models use Daybreak Blue when + # authorized; otherwise they fall back to Standard unless the model requires + # Daybreak access. Red-tier models use Daybreak Red and require authorization. + # Requests that require unavailable Daybreak access return 403. An implicit + # Standard fallback is represented by null in the response's access_programs + # field, rather than an explicit Standard selection. + + cyber: nil + ) + end + + sig do + override.returns( + {cyber: OpenAI::Beta::ResponseCreateParams::AccessPrograms::Cyber::OrSymbol} + ) + end + def to_hash + end + + # The Cyber access program to use for this request. Supported values are + # `standard`, `daybreak_blue`, and `daybreak_red`. If omitted, the API resolves + # the program from the model's Cyber tier and your organization and project + # access, subject to model-specific eligibility restrictions. By default, models + # without a Cyber tier use Standard. Blue-tier models use Daybreak Blue when + # authorized; otherwise they fall back to Standard unless the model requires + # Daybreak access. Red-tier models use Daybreak Red and require authorization. + # Requests that require unavailable Daybreak access return 403. An implicit + # Standard fallback is represented by null in the response's access_programs + # field, rather than an explicit Standard selection. + module Cyber + extend OpenAI::Internal::Type::Enum + + TaggedSymbol = T.type_alias { T.all(Symbol, OpenAI::Beta::ResponseCreateParams::AccessPrograms::Cyber) } + OrSymbol = T.type_alias { T.any(Symbol, String) } + + STANDARD = T.let(:standard, OpenAI::Beta::ResponseCreateParams::AccessPrograms::Cyber::TaggedSymbol) + DAYBREAK_BLUE = T.let( + :daybreak_blue, + OpenAI::Beta::ResponseCreateParams::AccessPrograms::Cyber::TaggedSymbol + ) + DAYBREAK_RED = T.let(:daybreak_red, OpenAI::Beta::ResponseCreateParams::AccessPrograms::Cyber::TaggedSymbol) + + sig { override.returns(T::Array[OpenAI::Beta::ResponseCreateParams::AccessPrograms::Cyber::TaggedSymbol]) } + def self.values + end + end + end + class ContextManagement < OpenAI::Internal::Type::BaseModel OrHash = T.type_alias do T.any( diff --git a/rbi/openai/models/responses/response.rbi b/rbi/openai/models/responses/response.rbi index 978d0f453..e282b8b97 100644 --- a/rbi/openai/models/responses/response.rbi +++ b/rbi/openai/models/responses/response.rbi @@ -18,6 +18,12 @@ module OpenAI sig { returns(String) } attr_accessor :id + sig { returns(T.nilable(OpenAI::Responses::Response::AccessPrograms)) } + attr_reader :access_programs + + sig { params(access_programs: T.nilable(OpenAI::Responses::Response::AccessPrograms::OrHash)).void } + attr_writer :access_programs + # Unix timestamp (in seconds) of when this Response was created. sig { returns(Float) } attr_accessor :created_at @@ -338,6 +344,8 @@ module OpenAI id: String, + access_programs: T.nilable(OpenAI::Responses::Response::AccessPrograms::OrHash), + created_at: Float, error: T.nilable(OpenAI::Responses::ResponseError::OrHash), @@ -478,6 +486,8 @@ module OpenAI # Unique identifier for this Response. id:, + access_programs:, + # Unix timestamp (in seconds) of when this Response was created. created_at:, @@ -715,6 +725,7 @@ module OpenAI override.returns( { id: String, + access_programs: T.nilable(OpenAI::Responses::Response::AccessPrograms), created_at: Float, error: T.nilable(OpenAI::Responses::ResponseError), incomplete_details: T.nilable(OpenAI::Responses::Response::IncompleteDetails), @@ -755,6 +766,58 @@ module OpenAI def to_hash end + class AccessPrograms < OpenAI::Internal::Type::BaseModel + OrHash = T.type_alias do + T.any( + OpenAI::Responses::Response::AccessPrograms, + OpenAI::Internal::AnyHash + ) + end + + # The effective Cyber access program used for this response. + sig { returns(OpenAI::Responses::Response::AccessPrograms::Cyber::TaggedSymbol) } + attr_accessor :cyber + + sig do + params( + + cyber: OpenAI::Responses::Response::AccessPrograms::Cyber::OrSymbol + ) + .returns(T.attached_class) + end + def self.new( + + # The effective Cyber access program used for this response. + + cyber: + ) + end + + sig do + override.returns( + {cyber: OpenAI::Responses::Response::AccessPrograms::Cyber::TaggedSymbol} + ) + end + def to_hash + end + + # The effective Cyber access program used for this response. + module Cyber + extend OpenAI::Internal::Type::Enum + + TaggedSymbol = T.type_alias { T.all(Symbol, OpenAI::Responses::Response::AccessPrograms::Cyber) } + OrSymbol = T.type_alias { T.any(Symbol, String) } + + STANDARD = T.let(:standard, OpenAI::Responses::Response::AccessPrograms::Cyber::TaggedSymbol) + DAYBREAK_BLUE = T.let(:daybreak_blue, OpenAI::Responses::Response::AccessPrograms::Cyber::TaggedSymbol) + DAYBREAK_RED = T.let(:daybreak_red, OpenAI::Responses::Response::AccessPrograms::Cyber::TaggedSymbol) + + sig { override.returns(T::Array[OpenAI::Responses::Response::AccessPrograms::Cyber::TaggedSymbol]) } + def self.values + end + end + end + class IncompleteDetails < OpenAI::Internal::Type::BaseModel OrHash = T.type_alias do T.any( diff --git a/rbi/openai/models/responses/response_create_params.rbi b/rbi/openai/models/responses/response_create_params.rbi index a017dd5c6..934997728 100644 --- a/rbi/openai/models/responses/response_create_params.rbi +++ b/rbi/openai/models/responses/response_create_params.rbi @@ -17,6 +17,13 @@ module OpenAI ) end + # Domain-specific access programs to use for this request. + sig { returns(T.nilable(OpenAI::Responses::ResponseCreateParams::AccessPrograms)) } + attr_reader :access_programs + + sig { params(access_programs: OpenAI::Responses::ResponseCreateParams::AccessPrograms::OrHash).void } + attr_writer :access_programs + # Whether to run the model response in the background. # [Learn more](https://developers.openai.com/api/docs/guides/background). sig { returns(T.nilable(T::Boolean)) } @@ -426,6 +433,8 @@ module OpenAI sig do params( + access_programs: OpenAI::Responses::ResponseCreateParams::AccessPrograms::OrHash, + background: T.nilable(T::Boolean), context_management: T.nilable(T::Array[OpenAI::Responses::ResponseCreateParams::ContextManagement::OrHash]), @@ -521,6 +530,9 @@ module OpenAI end def self.new( + # Domain-specific access programs to use for this request. + access_programs: nil, + # Whether to run the model response in the background. # [Learn more](https://developers.openai.com/api/docs/guides/background). background: nil, @@ -773,6 +785,7 @@ module OpenAI sig do override.returns( { + access_programs: OpenAI::Responses::ResponseCreateParams::AccessPrograms, background: T.nilable(T::Boolean), context_management: T.nilable(T::Array[OpenAI::Responses::ResponseCreateParams::ContextManagement]), conversation: T.nilable(T.any(String, OpenAI::Responses::ResponseConversationParam)), @@ -839,6 +852,99 @@ module OpenAI def to_hash end + class AccessPrograms < OpenAI::Internal::Type::BaseModel + OrHash = T.type_alias do + T.any( + OpenAI::Responses::ResponseCreateParams::AccessPrograms, + OpenAI::Internal::AnyHash + ) + end + + # The Cyber access program to use for this request. Supported values are + # `standard`, `daybreak_blue`, and `daybreak_red`. If omitted, the API resolves + # the program from the model's Cyber tier and your organization and project + # access, subject to model-specific eligibility restrictions. By default, models + # without a Cyber tier use Standard. Blue-tier models use Daybreak Blue when + # authorized; otherwise they fall back to Standard unless the model requires + # Daybreak access. Red-tier models use Daybreak Red and require authorization. + # Requests that require unavailable Daybreak access return 403. An implicit + # Standard fallback is represented by null in the response's access_programs + # field, rather than an explicit Standard selection. + sig { returns(T.nilable(OpenAI::Responses::ResponseCreateParams::AccessPrograms::Cyber::OrSymbol)) } + attr_reader :cyber + + sig { params(cyber: OpenAI::Responses::ResponseCreateParams::AccessPrograms::Cyber::OrSymbol).void } + attr_writer :cyber + + # Domain-specific access programs to use for this request. + sig do + params( + + cyber: OpenAI::Responses::ResponseCreateParams::AccessPrograms::Cyber::OrSymbol + ) + .returns(T.attached_class) + end + def self.new( + + # The Cyber access program to use for this request. Supported values are + # `standard`, `daybreak_blue`, and `daybreak_red`. If omitted, the API resolves + # the program from the model's Cyber tier and your organization and project + # access, subject to model-specific eligibility restrictions. By default, models + # without a Cyber tier use Standard. Blue-tier models use Daybreak Blue when + # authorized; otherwise they fall back to Standard unless the model requires + # Daybreak access. Red-tier models use Daybreak Red and require authorization. + # Requests that require unavailable Daybreak access return 403. An implicit + # Standard fallback is represented by null in the response's access_programs + # field, rather than an explicit Standard selection. + + cyber: nil + ) + end + + sig do + override.returns( + {cyber: OpenAI::Responses::ResponseCreateParams::AccessPrograms::Cyber::OrSymbol} + ) + end + def to_hash + end + + # The Cyber access program to use for this request. Supported values are + # `standard`, `daybreak_blue`, and `daybreak_red`. If omitted, the API resolves + # the program from the model's Cyber tier and your organization and project + # access, subject to model-specific eligibility restrictions. By default, models + # without a Cyber tier use Standard. Blue-tier models use Daybreak Blue when + # authorized; otherwise they fall back to Standard unless the model requires + # Daybreak access. Red-tier models use Daybreak Red and require authorization. + # Requests that require unavailable Daybreak access return 403. An implicit + # Standard fallback is represented by null in the response's access_programs + # field, rather than an explicit Standard selection. + module Cyber + extend OpenAI::Internal::Type::Enum + + TaggedSymbol = T.type_alias { + T.all(Symbol, OpenAI::Responses::ResponseCreateParams::AccessPrograms::Cyber) + } + OrSymbol = T.type_alias { T.any(Symbol, String) } + + STANDARD = T.let(:standard, OpenAI::Responses::ResponseCreateParams::AccessPrograms::Cyber::TaggedSymbol) + DAYBREAK_BLUE = T.let( + :daybreak_blue, + OpenAI::Responses::ResponseCreateParams::AccessPrograms::Cyber::TaggedSymbol + ) + DAYBREAK_RED = T.let( + :daybreak_red, + OpenAI::Responses::ResponseCreateParams::AccessPrograms::Cyber::TaggedSymbol + ) + + sig { + override.returns(T::Array[OpenAI::Responses::ResponseCreateParams::AccessPrograms::Cyber::TaggedSymbol]) + } + def self.values + end + end + end + class ContextManagement < OpenAI::Internal::Type::BaseModel OrHash = T.type_alias do T.any( diff --git a/rbi/openai/models/responses/responses_client_event.rbi b/rbi/openai/models/responses/responses_client_event.rbi index 78c33a0f2..fcfd7da03 100644 --- a/rbi/openai/models/responses/responses_client_event.rbi +++ b/rbi/openai/models/responses/responses_client_event.rbi @@ -28,6 +28,16 @@ module OpenAI sig { returns(Symbol) } attr_accessor :type + # Domain-specific access programs to use for this request. + sig { returns(T.nilable(OpenAI::Responses::ResponsesClientEvent::ResponseCreate::AccessPrograms)) } + attr_reader :access_programs + + sig { + params(access_programs: OpenAI::Responses::ResponsesClientEvent::ResponseCreate::AccessPrograms::OrHash) + .void + } + attr_writer :access_programs + # Whether to run the model response in the background. # [Learn more](https://developers.openai.com/api/docs/guides/background). sig { returns(T.nilable(T::Boolean)) } @@ -476,6 +486,8 @@ module OpenAI sig do params( + access_programs: OpenAI::Responses::ResponsesClientEvent::ResponseCreate::AccessPrograms::OrHash, + background: T.nilable(T::Boolean), context_management: T.nilable( @@ -579,6 +591,9 @@ module OpenAI end def self.new( + # Domain-specific access programs to use for this request. + access_programs: nil, + # Whether to run the model response in the background. # [Learn more](https://developers.openai.com/api/docs/guides/background). background: nil, @@ -849,6 +864,7 @@ module OpenAI override.returns( { type: Symbol, + access_programs: T.nilable(OpenAI::Responses::ResponsesClientEvent::ResponseCreate::AccessPrograms), background: T.nilable(T::Boolean), context_management: T.nilable( T::Array[OpenAI::Responses::ResponsesClientEvent::ResponseCreate::ContextManagement] @@ -928,6 +944,115 @@ module OpenAI def to_hash end + class AccessPrograms < OpenAI::Internal::Type::BaseModel + OrHash = T.type_alias do + T.any( + OpenAI::Responses::ResponsesClientEvent::ResponseCreate::AccessPrograms, + OpenAI::Internal::AnyHash + ) + end + + # The Cyber access program to use for this request. Supported values are + # `standard`, `daybreak_blue`, and `daybreak_red`. If omitted, the API resolves + # the program from the model's Cyber tier and your organization and project + # access, subject to model-specific eligibility restrictions. By default, models + # without a Cyber tier use Standard. Blue-tier models use Daybreak Blue when + # authorized; otherwise they fall back to Standard unless the model requires + # Daybreak access. Red-tier models use Daybreak Red and require authorization. + # Requests that require unavailable Daybreak access return 403. An implicit + # Standard fallback is represented by null in the response's access_programs + # field, rather than an explicit Standard selection. + sig { + returns( + T.nilable(OpenAI::Responses::ResponsesClientEvent::ResponseCreate::AccessPrograms::Cyber::OrSymbol) + ) + } + attr_reader :cyber + + sig { + params(cyber: OpenAI::Responses::ResponsesClientEvent::ResponseCreate::AccessPrograms::Cyber::OrSymbol) + .void + } + attr_writer :cyber + + # Domain-specific access programs to use for this request. + sig do + params( + + cyber: OpenAI::Responses::ResponsesClientEvent::ResponseCreate::AccessPrograms::Cyber::OrSymbol + ) + .returns(T.attached_class) + end + def self.new( + + # The Cyber access program to use for this request. Supported values are + # `standard`, `daybreak_blue`, and `daybreak_red`. If omitted, the API resolves + # the program from the model's Cyber tier and your organization and project + # access, subject to model-specific eligibility restrictions. By default, models + # without a Cyber tier use Standard. Blue-tier models use Daybreak Blue when + # authorized; otherwise they fall back to Standard unless the model requires + # Daybreak access. Red-tier models use Daybreak Red and require authorization. + # Requests that require unavailable Daybreak access return 403. An implicit + # Standard fallback is represented by null in the response's access_programs + # field, rather than an explicit Standard selection. + + cyber: nil + ) + end + + sig do + override.returns( + { + cyber: T.nilable( + OpenAI::Responses::ResponsesClientEvent::ResponseCreate::AccessPrograms::Cyber::OrSymbol + ) + } + ) + end + def to_hash + end + + # The Cyber access program to use for this request. Supported values are + # `standard`, `daybreak_blue`, and `daybreak_red`. If omitted, the API resolves + # the program from the model's Cyber tier and your organization and project + # access, subject to model-specific eligibility restrictions. By default, models + # without a Cyber tier use Standard. Blue-tier models use Daybreak Blue when + # authorized; otherwise they fall back to Standard unless the model requires + # Daybreak access. Red-tier models use Daybreak Red and require authorization. + # Requests that require unavailable Daybreak access return 403. An implicit + # Standard fallback is represented by null in the response's access_programs + # field, rather than an explicit Standard selection. + module Cyber + extend OpenAI::Internal::Type::Enum + + TaggedSymbol = T.type_alias { + T.all(Symbol, OpenAI::Responses::ResponsesClientEvent::ResponseCreate::AccessPrograms::Cyber) + } + OrSymbol = T.type_alias { T.any(Symbol, String) } + + STANDARD = T.let( + :standard, + OpenAI::Responses::ResponsesClientEvent::ResponseCreate::AccessPrograms::Cyber::TaggedSymbol + ) + DAYBREAK_BLUE = T.let( + :daybreak_blue, + OpenAI::Responses::ResponsesClientEvent::ResponseCreate::AccessPrograms::Cyber::TaggedSymbol + ) + DAYBREAK_RED = T.let( + :daybreak_red, + OpenAI::Responses::ResponsesClientEvent::ResponseCreate::AccessPrograms::Cyber::TaggedSymbol + ) + + sig { + override.returns( + T::Array[OpenAI::Responses::ResponsesClientEvent::ResponseCreate::AccessPrograms::Cyber::TaggedSymbol] + ) + } + def self.values + end + end + end + class ContextManagement < OpenAI::Internal::Type::BaseModel OrHash = T.type_alias do T.any( diff --git a/rbi/openai/resources/beta/responses.rbi b/rbi/openai/resources/beta/responses.rbi index 64bc74350..2f6bf43d9 100644 --- a/rbi/openai/resources/beta/responses.rbi +++ b/rbi/openai/resources/beta/responses.rbi @@ -31,6 +31,7 @@ module OpenAI # to use your own data as input for the model's response. sig { params( + access_programs: OpenAI::Beta::ResponseCreateParams::AccessPrograms::OrHash, background: T.nilable(T::Boolean), context_management: T.nilable(T::Array[OpenAI::Beta::ResponseCreateParams::ContextManagement::OrHash]), conversation: T.nilable(T.any(String, OpenAI::Beta::BetaResponseConversationParam::OrHash)), @@ -98,6 +99,8 @@ module OpenAI .returns(OpenAI::Beta::BetaResponse) } def create( + # Body param: Domain-specific access programs to use for this request. + access_programs: nil, # Body param: Whether to run the model response in the background. # [Learn more](https://developers.openai.com/api/docs/guides/background). background: nil, @@ -346,6 +349,7 @@ module OpenAI # to use your own data as input for the model's response. sig { params( + access_programs: OpenAI::Beta::ResponseCreateParams::AccessPrograms::OrHash, background: T.nilable(T::Boolean), context_management: T.nilable(T::Array[OpenAI::Beta::ResponseCreateParams::ContextManagement::OrHash]), conversation: T.nilable(T.any(String, OpenAI::Beta::BetaResponseConversationParam::OrHash)), @@ -417,6 +421,8 @@ module OpenAI ) } def stream_raw( + # Body param: Domain-specific access programs to use for this request. + access_programs: nil, # Body param: Whether to run the model response in the background. # [Learn more](https://developers.openai.com/api/docs/guides/background). background: nil, diff --git a/rbi/openai/resources/responses.rbi b/rbi/openai/resources/responses.rbi index 54e47f6fd..89cf9b79e 100644 --- a/rbi/openai/resources/responses.rbi +++ b/rbi/openai/resources/responses.rbi @@ -29,6 +29,7 @@ module OpenAI # to use your own data as input for the model's response. sig do params( + access_programs: OpenAI::Responses::ResponseCreateParams::AccessPrograms::OrHash, background: T.nilable(T::Boolean), context_management: T.nilable(T::Array[OpenAI::Responses::ResponseCreateParams::ContextManagement::OrHash]), conversation: T.nilable(T.any(String, OpenAI::Responses::ResponseConversationParam::OrHash)), @@ -97,6 +98,8 @@ module OpenAI .returns(OpenAI::Responses::Response) end def create( + # Domain-specific access programs to use for this request. + access_programs: nil, # Whether to run the model response in the background. # [Learn more](https://developers.openai.com/api/docs/guides/background). background: nil, @@ -334,6 +337,7 @@ module OpenAI # to use your own data as input for the model's response. sig do params( + access_programs: OpenAI::Responses::ResponseCreateParams::AccessPrograms::OrHash, background: T.nilable(T::Boolean), context_management: T.nilable(T::Array[OpenAI::Responses::ResponseCreateParams::ContextManagement::OrHash]), conversation: T.nilable(T.any(String, OpenAI::Responses::ResponseConversationParam::OrHash)), @@ -408,6 +412,8 @@ module OpenAI ) end def stream_raw( + # Domain-specific access programs to use for this request. + access_programs: nil, # Whether to run the model response in the background. # [Learn more](https://developers.openai.com/api/docs/guides/background). background: nil, @@ -645,6 +651,7 @@ module OpenAI # your own data as input for the model's response. sig do params( + access_programs: OpenAI::Responses::ResponseCreateParams::AccessPrograms::OrHash, background: T.nilable(T::Boolean), include: T.nilable( T::Array[OpenAI::Responses::ResponseIncludable::OrSymbol] @@ -715,6 +722,8 @@ module OpenAI .returns(OpenAI::Streaming::ResponseStream) end def stream( + # Domain-specific access programs to use for this request. + access_programs: nil, # Whether to run the model response in the background. # [Learn more](https://developers.openai.com/api/docs/guides/background). background: nil, @@ -1134,6 +1143,7 @@ module OpenAI class Response sig do params( + access_programs: OpenAI::Responses::ResponsesClientEvent::ResponseCreate::AccessPrograms::OrHash, background: T.nilable(T::Boolean), context_management: T.nilable( T::Array[OpenAI::Responses::ResponsesClientEvent::ResponseCreate::ContextManagement::OrHash] @@ -1204,6 +1214,7 @@ module OpenAI .void end def create( + access_programs: nil, background: nil, context_management: nil, conversation: nil, diff --git a/sig/openai/models/beta/beta_response.rbs b/sig/openai/models/beta/beta_response.rbs index 1af490884..c152f46ef 100644 --- a/sig/openai/models/beta/beta_response.rbs +++ b/sig/openai/models/beta/beta_response.rbs @@ -6,6 +6,7 @@ module OpenAI type beta_response = { id: String, + access_programs: OpenAI::Beta::BetaResponse::AccessPrograms?, created_at: Float, error: OpenAI::Beta::BetaResponseError?, incomplete_details: OpenAI::Beta::BetaResponse::IncompleteDetails?, @@ -46,6 +47,8 @@ module OpenAI # Unique identifier for this Response. attr_accessor id: String + attr_accessor access_programs: OpenAI::Beta::BetaResponse::AccessPrograms? + # Unix timestamp (in seconds) of when this Response was created. attr_accessor created_at: Float @@ -515,6 +518,7 @@ module OpenAI # The object type of this resource - always set to `response`. def initialize: ( id: String, + access_programs: OpenAI::Beta::BetaResponse::AccessPrograms?, created_at: Float, error: OpenAI::Beta::BetaResponseError?, incomplete_details: OpenAI::Beta::BetaResponse::IncompleteDetails?, @@ -553,6 +557,7 @@ module OpenAI def to_hash: -> { id: String, + access_programs: OpenAI::Beta::BetaResponse::AccessPrograms?, created_at: Float, error: OpenAI::Beta::BetaResponseError?, incomplete_details: OpenAI::Beta::BetaResponse::IncompleteDetails?, @@ -589,6 +594,36 @@ module OpenAI ?user: String } + type access_programs = + { cyber: OpenAI::Models::Beta::BetaResponse::AccessPrograms::cyber } + + class AccessPrograms < OpenAI::Internal::Type::BaseModel + # The effective Cyber access program used for this response. + attr_accessor cyber: OpenAI::Models::Beta::BetaResponse::AccessPrograms::cyber + + # @param cyber + # The effective Cyber access program used for this response. + def initialize: ( + cyber: OpenAI::Models::Beta::BetaResponse::AccessPrograms::cyber + ) -> void + + def to_hash: -> { + cyber: OpenAI::Models::Beta::BetaResponse::AccessPrograms::cyber + } + + type cyber = :standard | :daybreak_blue | :daybreak_red + + module Cyber + extend OpenAI::Internal::Type::Enum + + STANDARD: :standard + DAYBREAK_BLUE: :daybreak_blue + DAYBREAK_RED: :daybreak_red + + def self?.values: -> ::Array[OpenAI::Models::Beta::BetaResponse::AccessPrograms::cyber] + end + end + type incomplete_details = { ?reason: OpenAI::Models::Beta::BetaResponse::IncompleteDetails::reason diff --git a/sig/openai/models/beta/beta_responses_client_event.rbs b/sig/openai/models/beta/beta_responses_client_event.rbs index 4dc9eef8e..09d9bdb8d 100644 --- a/sig/openai/models/beta/beta_responses_client_event.rbs +++ b/sig/openai/models/beta/beta_responses_client_event.rbs @@ -14,6 +14,7 @@ module OpenAI type response_create = { ?type: :"response.create", + ?access_programs: OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::AccessPrograms, ?background: bool?, ?context_management: ::Array[OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::ContextManagement]?, ?conversation: OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::conversation?, @@ -53,6 +54,14 @@ module OpenAI # The type of the client event. Always `response.create`. attr_accessor type: :"response.create" + # Domain-specific access programs to use for this request. + attr_reader access_programs: OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::AccessPrograms? + + # Domain-specific access programs to use for this request. + def access_programs=: ( + OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::AccessPrograms + ) -> OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::AccessPrograms + # Whether to run the model response in the background. # [Learn more](https://developers.openai.com/api/docs/guides/background). attr_accessor background: bool? @@ -405,6 +414,8 @@ module OpenAI # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). def user=: (String) -> String + # @param access_programs + # Domain-specific access programs to use for this request. # @param background # Whether to run the model response in the background. # [Learn more](https://developers.openai.com/api/docs/guides/background). @@ -638,6 +649,7 @@ module OpenAI # @param type # The type of the client event. Always `response.create`. def initialize: ( + ?access_programs: OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::AccessPrograms, ?background: bool?, ?context_management: ::Array[OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::ContextManagement]?, ?conversation: OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::conversation?, @@ -676,6 +688,7 @@ module OpenAI def to_hash: -> { ?type: :"response.create", + ?access_programs: OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::AccessPrograms, ?background: bool?, ?context_management: ::Array[OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::ContextManagement]?, ?conversation: OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::conversation?, @@ -711,6 +724,70 @@ module OpenAI ?user: String } + type access_programs = + { + ?cyber: OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::AccessPrograms::cyber + } + + class AccessPrograms < OpenAI::Internal::Type::BaseModel + # The Cyber access program to use for this request. Supported values are + # `standard`, `daybreak_blue`, and `daybreak_red`. If omitted, the API resolves + # the program from the model's Cyber tier and your organization and project + # access, subject to model-specific eligibility restrictions. By default, models + # without a Cyber tier use Standard. Blue-tier models use Daybreak Blue when + # authorized; otherwise they fall back to Standard unless the model requires + # Daybreak access. Red-tier models use Daybreak Red and require authorization. + # Requests that require unavailable Daybreak access return 403. An implicit + # Standard fallback is represented by null in the response's access_programs + # field, rather than an explicit Standard selection. + attr_reader cyber: OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::AccessPrograms::cyber? + + # The Cyber access program to use for this request. Supported values are + # `standard`, `daybreak_blue`, and `daybreak_red`. If omitted, the API resolves + # the program from the model's Cyber tier and your organization and project + # access, subject to model-specific eligibility restrictions. By default, models + # without a Cyber tier use Standard. Blue-tier models use Daybreak Blue when + # authorized; otherwise they fall back to Standard unless the model requires + # Daybreak access. Red-tier models use Daybreak Red and require authorization. + # Requests that require unavailable Daybreak access return 403. An implicit + # Standard fallback is represented by null in the response's access_programs + # field, rather than an explicit Standard selection. + def cyber=: ( + OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::AccessPrograms::cyber + ) -> OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::AccessPrograms::cyber + + # @param cyber + # The Cyber access program to use for this request. Supported values are + # `standard`, `daybreak_blue`, and `daybreak_red`. If omitted, the API resolves + # the program from the model's Cyber tier and your organization and project + # access, subject to model-specific eligibility restrictions. By default, models + # without a Cyber tier use Standard. Blue-tier models use Daybreak Blue when + # authorized; otherwise they fall back to Standard unless the model requires + # Daybreak access. Red-tier models use Daybreak Red and require authorization. + # Requests that require unavailable Daybreak access return 403. An implicit + # Standard fallback is represented by null in the response's access_programs + # field, rather than an explicit Standard selection. + def initialize: ( + ?cyber: OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::AccessPrograms::cyber + ) -> void + + def to_hash: -> { + ?cyber: OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::AccessPrograms::cyber + } + + type cyber = :standard | :daybreak_blue | :daybreak_red + + module Cyber + extend OpenAI::Internal::Type::Enum + + STANDARD: :standard + DAYBREAK_BLUE: :daybreak_blue + DAYBREAK_RED: :daybreak_red + + def self?.values: -> ::Array[OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::AccessPrograms::cyber] + end + end + type context_management = { type: String, ?compact_threshold: Integer? } diff --git a/sig/openai/models/beta/response_create_params.rbs b/sig/openai/models/beta/response_create_params.rbs index b1f9e7d73..f5f29613f 100644 --- a/sig/openai/models/beta/response_create_params.rbs +++ b/sig/openai/models/beta/response_create_params.rbs @@ -3,6 +3,7 @@ module OpenAI module Beta type response_create_params = { + ?access_programs: OpenAI::Beta::ResponseCreateParams::AccessPrograms, ?background: bool?, ?context_management: ::Array[OpenAI::Beta::ResponseCreateParams::ContextManagement]?, ?conversation: OpenAI::Models::Beta::ResponseCreateParams::conversation?, @@ -42,6 +43,14 @@ module OpenAI extend OpenAI::Internal::Type::RequestParameters::Converter include OpenAI::Internal::Type::RequestParameters + # Domain-specific access programs to use for this request. + attr_reader access_programs: OpenAI::Beta::ResponseCreateParams::AccessPrograms? + + # Domain-specific access programs to use for this request. + def access_programs=: ( + OpenAI::Beta::ResponseCreateParams::AccessPrograms + ) -> OpenAI::Beta::ResponseCreateParams::AccessPrograms + # Whether to run the model response in the background. # [Learn more](https://developers.openai.com/api/docs/guides/background). attr_accessor background: bool? @@ -378,6 +387,8 @@ module OpenAI ::Array[OpenAI::Models::Beta::ResponseCreateParams::beta] ) -> ::Array[OpenAI::Models::Beta::ResponseCreateParams::beta] + # @param access_programs + # Domain-specific access programs to use for this request. # @param background # Whether to run the model response in the background. # [Learn more](https://developers.openai.com/api/docs/guides/background). @@ -596,6 +607,7 @@ module OpenAI # similar requests and to help OpenAI detect and prevent abuse. # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). def initialize: ( + ?access_programs: OpenAI::Beta::ResponseCreateParams::AccessPrograms, ?background: bool?, ?context_management: ::Array[OpenAI::Beta::ResponseCreateParams::ContextManagement]?, ?conversation: OpenAI::Models::Beta::ResponseCreateParams::conversation?, @@ -632,6 +644,7 @@ module OpenAI ) -> void def to_hash: -> { + ?access_programs: OpenAI::Beta::ResponseCreateParams::AccessPrograms, ?background: bool?, ?context_management: ::Array[OpenAI::Beta::ResponseCreateParams::ContextManagement]?, ?conversation: OpenAI::Models::Beta::ResponseCreateParams::conversation?, @@ -667,6 +680,70 @@ module OpenAI ?request_options: OpenAI::RequestOptions } + type access_programs = + { + ?cyber: OpenAI::Models::Beta::ResponseCreateParams::AccessPrograms::cyber + } + + class AccessPrograms < OpenAI::Internal::Type::BaseModel + # The Cyber access program to use for this request. Supported values are + # `standard`, `daybreak_blue`, and `daybreak_red`. If omitted, the API resolves + # the program from the model's Cyber tier and your organization and project + # access, subject to model-specific eligibility restrictions. By default, models + # without a Cyber tier use Standard. Blue-tier models use Daybreak Blue when + # authorized; otherwise they fall back to Standard unless the model requires + # Daybreak access. Red-tier models use Daybreak Red and require authorization. + # Requests that require unavailable Daybreak access return 403. An implicit + # Standard fallback is represented by null in the response's access_programs + # field, rather than an explicit Standard selection. + attr_reader cyber: OpenAI::Models::Beta::ResponseCreateParams::AccessPrograms::cyber? + + # The Cyber access program to use for this request. Supported values are + # `standard`, `daybreak_blue`, and `daybreak_red`. If omitted, the API resolves + # the program from the model's Cyber tier and your organization and project + # access, subject to model-specific eligibility restrictions. By default, models + # without a Cyber tier use Standard. Blue-tier models use Daybreak Blue when + # authorized; otherwise they fall back to Standard unless the model requires + # Daybreak access. Red-tier models use Daybreak Red and require authorization. + # Requests that require unavailable Daybreak access return 403. An implicit + # Standard fallback is represented by null in the response's access_programs + # field, rather than an explicit Standard selection. + def cyber=: ( + OpenAI::Models::Beta::ResponseCreateParams::AccessPrograms::cyber + ) -> OpenAI::Models::Beta::ResponseCreateParams::AccessPrograms::cyber + + # @param cyber + # The Cyber access program to use for this request. Supported values are + # `standard`, `daybreak_blue`, and `daybreak_red`. If omitted, the API resolves + # the program from the model's Cyber tier and your organization and project + # access, subject to model-specific eligibility restrictions. By default, models + # without a Cyber tier use Standard. Blue-tier models use Daybreak Blue when + # authorized; otherwise they fall back to Standard unless the model requires + # Daybreak access. Red-tier models use Daybreak Red and require authorization. + # Requests that require unavailable Daybreak access return 403. An implicit + # Standard fallback is represented by null in the response's access_programs + # field, rather than an explicit Standard selection. + def initialize: ( + ?cyber: OpenAI::Models::Beta::ResponseCreateParams::AccessPrograms::cyber + ) -> void + + def to_hash: -> { + ?cyber: OpenAI::Models::Beta::ResponseCreateParams::AccessPrograms::cyber + } + + type cyber = :standard | :daybreak_blue | :daybreak_red + + module Cyber + extend OpenAI::Internal::Type::Enum + + STANDARD: :standard + DAYBREAK_BLUE: :daybreak_blue + DAYBREAK_RED: :daybreak_red + + def self?.values: -> ::Array[OpenAI::Models::Beta::ResponseCreateParams::AccessPrograms::cyber] + end + end + type context_management = { type: String, ?compact_threshold: Integer? } class ContextManagement < OpenAI::Internal::Type::BaseModel diff --git a/sig/openai/models/responses/response.rbs b/sig/openai/models/responses/response.rbs index 8794de0b1..93e78f512 100644 --- a/sig/openai/models/responses/response.rbs +++ b/sig/openai/models/responses/response.rbs @@ -4,6 +4,7 @@ module OpenAI type response = { id: String, + access_programs: OpenAI::Responses::Response::AccessPrograms?, created_at: Float, error: OpenAI::Responses::ResponseError?, incomplete_details: OpenAI::Responses::Response::IncompleteDetails?, @@ -44,6 +45,8 @@ module OpenAI # Unique identifier for this Response. attr_accessor id: String + attr_accessor access_programs: OpenAI::Responses::Response::AccessPrograms? + # Unix timestamp (in seconds) of when this Response was created. attr_accessor created_at: Float @@ -515,6 +518,7 @@ module OpenAI # The object type of this resource - always set to `response`. def initialize: ( id: String, + access_programs: OpenAI::Responses::Response::AccessPrograms?, created_at: Float, error: OpenAI::Responses::ResponseError?, incomplete_details: OpenAI::Responses::Response::IncompleteDetails?, @@ -553,6 +557,7 @@ module OpenAI def to_hash: -> { id: String, + access_programs: OpenAI::Responses::Response::AccessPrograms?, created_at: Float, error: OpenAI::Responses::ResponseError?, incomplete_details: OpenAI::Responses::Response::IncompleteDetails?, @@ -589,6 +594,36 @@ module OpenAI ?user: String } + type access_programs = + { cyber: OpenAI::Models::Responses::Response::AccessPrograms::cyber } + + class AccessPrograms < OpenAI::Internal::Type::BaseModel + # The effective Cyber access program used for this response. + attr_accessor cyber: OpenAI::Models::Responses::Response::AccessPrograms::cyber + + # @param cyber + # The effective Cyber access program used for this response. + def initialize: ( + cyber: OpenAI::Models::Responses::Response::AccessPrograms::cyber + ) -> void + + def to_hash: -> { + cyber: OpenAI::Models::Responses::Response::AccessPrograms::cyber + } + + type cyber = :standard | :daybreak_blue | :daybreak_red + + module Cyber + extend OpenAI::Internal::Type::Enum + + STANDARD: :standard + DAYBREAK_BLUE: :daybreak_blue + DAYBREAK_RED: :daybreak_red + + def self?.values: -> ::Array[OpenAI::Models::Responses::Response::AccessPrograms::cyber] + end + end + type incomplete_details = { ?reason: OpenAI::Models::Responses::Response::IncompleteDetails::reason diff --git a/sig/openai/models/responses/response_create_params.rbs b/sig/openai/models/responses/response_create_params.rbs index a00840d76..ca2fce152 100644 --- a/sig/openai/models/responses/response_create_params.rbs +++ b/sig/openai/models/responses/response_create_params.rbs @@ -3,6 +3,7 @@ module OpenAI module Responses type response_create_params = { + ?access_programs: OpenAI::Responses::ResponseCreateParams::AccessPrograms, ?background: bool?, ?context_management: ::Array[OpenAI::Responses::ResponseCreateParams::ContextManagement]?, ?conversation: OpenAI::Models::Responses::ResponseCreateParams::conversation?, @@ -40,6 +41,14 @@ module OpenAI extend OpenAI::Internal::Type::RequestParameters::Converter include OpenAI::Internal::Type::RequestParameters + # Domain-specific access programs to use for this request. + attr_reader access_programs: OpenAI::Responses::ResponseCreateParams::AccessPrograms? + + # Domain-specific access programs to use for this request. + def access_programs=: ( + OpenAI::Responses::ResponseCreateParams::AccessPrograms + ) -> OpenAI::Responses::ResponseCreateParams::AccessPrograms + # Whether to run the model response in the background. # [Learn more](https://developers.openai.com/api/docs/guides/background). attr_accessor background: bool? @@ -367,6 +376,8 @@ module OpenAI # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). def user=: (String) -> String + # @param access_programs + # Domain-specific access programs to use for this request. # @param background # Whether to run the model response in the background. # [Learn more](https://developers.openai.com/api/docs/guides/background). @@ -583,6 +594,7 @@ module OpenAI # similar requests and to help OpenAI detect and prevent abuse. # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). def initialize: ( + ?access_programs: OpenAI::Responses::ResponseCreateParams::AccessPrograms, ?background: bool?, ?context_management: ::Array[OpenAI::Responses::ResponseCreateParams::ContextManagement]?, ?conversation: OpenAI::Models::Responses::ResponseCreateParams::conversation?, @@ -617,6 +629,7 @@ module OpenAI ) -> void def to_hash: -> { + ?access_programs: OpenAI::Responses::ResponseCreateParams::AccessPrograms, ?background: bool?, ?context_management: ::Array[OpenAI::Responses::ResponseCreateParams::ContextManagement]?, ?conversation: OpenAI::Models::Responses::ResponseCreateParams::conversation?, @@ -650,6 +663,70 @@ module OpenAI ?request_options: OpenAI::RequestOptions } + type access_programs = + { + ?cyber: OpenAI::Models::Responses::ResponseCreateParams::AccessPrograms::cyber + } + + class AccessPrograms < OpenAI::Internal::Type::BaseModel + # The Cyber access program to use for this request. Supported values are + # `standard`, `daybreak_blue`, and `daybreak_red`. If omitted, the API resolves + # the program from the model's Cyber tier and your organization and project + # access, subject to model-specific eligibility restrictions. By default, models + # without a Cyber tier use Standard. Blue-tier models use Daybreak Blue when + # authorized; otherwise they fall back to Standard unless the model requires + # Daybreak access. Red-tier models use Daybreak Red and require authorization. + # Requests that require unavailable Daybreak access return 403. An implicit + # Standard fallback is represented by null in the response's access_programs + # field, rather than an explicit Standard selection. + attr_reader cyber: OpenAI::Models::Responses::ResponseCreateParams::AccessPrograms::cyber? + + # The Cyber access program to use for this request. Supported values are + # `standard`, `daybreak_blue`, and `daybreak_red`. If omitted, the API resolves + # the program from the model's Cyber tier and your organization and project + # access, subject to model-specific eligibility restrictions. By default, models + # without a Cyber tier use Standard. Blue-tier models use Daybreak Blue when + # authorized; otherwise they fall back to Standard unless the model requires + # Daybreak access. Red-tier models use Daybreak Red and require authorization. + # Requests that require unavailable Daybreak access return 403. An implicit + # Standard fallback is represented by null in the response's access_programs + # field, rather than an explicit Standard selection. + def cyber=: ( + OpenAI::Models::Responses::ResponseCreateParams::AccessPrograms::cyber + ) -> OpenAI::Models::Responses::ResponseCreateParams::AccessPrograms::cyber + + # @param cyber + # The Cyber access program to use for this request. Supported values are + # `standard`, `daybreak_blue`, and `daybreak_red`. If omitted, the API resolves + # the program from the model's Cyber tier and your organization and project + # access, subject to model-specific eligibility restrictions. By default, models + # without a Cyber tier use Standard. Blue-tier models use Daybreak Blue when + # authorized; otherwise they fall back to Standard unless the model requires + # Daybreak access. Red-tier models use Daybreak Red and require authorization. + # Requests that require unavailable Daybreak access return 403. An implicit + # Standard fallback is represented by null in the response's access_programs + # field, rather than an explicit Standard selection. + def initialize: ( + ?cyber: OpenAI::Models::Responses::ResponseCreateParams::AccessPrograms::cyber + ) -> void + + def to_hash: -> { + ?cyber: OpenAI::Models::Responses::ResponseCreateParams::AccessPrograms::cyber + } + + type cyber = :standard | :daybreak_blue | :daybreak_red + + module Cyber + extend OpenAI::Internal::Type::Enum + + STANDARD: :standard + DAYBREAK_BLUE: :daybreak_blue + DAYBREAK_RED: :daybreak_red + + def self?.values: -> ::Array[OpenAI::Models::Responses::ResponseCreateParams::AccessPrograms::cyber] + end + end + type context_management = { type: String, ?compact_threshold: Integer? } class ContextManagement < OpenAI::Internal::Type::BaseModel diff --git a/sig/openai/models/responses/responses_client_event.rbs b/sig/openai/models/responses/responses_client_event.rbs index bd0328275..0e56c3de7 100644 --- a/sig/openai/models/responses/responses_client_event.rbs +++ b/sig/openai/models/responses/responses_client_event.rbs @@ -11,6 +11,7 @@ module OpenAI type response_create = { ?type: :"response.create", + ?access_programs: OpenAI::Responses::ResponsesClientEvent::ResponseCreate::AccessPrograms, ?background: bool?, ?context_management: ::Array[OpenAI::Responses::ResponsesClientEvent::ResponseCreate::ContextManagement]?, ?conversation: OpenAI::Models::Responses::ResponsesClientEvent::ResponseCreate::conversation?, @@ -49,6 +50,14 @@ module OpenAI # The type of the client event. Always `response.create`. attr_accessor type: :"response.create" + # Domain-specific access programs to use for this request. + attr_reader access_programs: OpenAI::Responses::ResponsesClientEvent::ResponseCreate::AccessPrograms? + + # Domain-specific access programs to use for this request. + def access_programs=: ( + OpenAI::Responses::ResponsesClientEvent::ResponseCreate::AccessPrograms + ) -> OpenAI::Responses::ResponsesClientEvent::ResponseCreate::AccessPrograms + # Whether to run the model response in the background. # [Learn more](https://developers.openai.com/api/docs/guides/background). attr_accessor background: bool? @@ -398,6 +407,8 @@ module OpenAI # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). def user=: (String) -> String + # @param access_programs + # Domain-specific access programs to use for this request. # @param background # Whether to run the model response in the background. # [Learn more](https://developers.openai.com/api/docs/guides/background). @@ -629,6 +640,7 @@ module OpenAI # @param type # The type of the client event. Always `response.create`. def initialize: ( + ?access_programs: OpenAI::Responses::ResponsesClientEvent::ResponseCreate::AccessPrograms, ?background: bool?, ?context_management: ::Array[OpenAI::Responses::ResponsesClientEvent::ResponseCreate::ContextManagement]?, ?conversation: OpenAI::Models::Responses::ResponsesClientEvent::ResponseCreate::conversation?, @@ -666,6 +678,7 @@ module OpenAI def to_hash: -> { ?type: :"response.create", + ?access_programs: OpenAI::Responses::ResponsesClientEvent::ResponseCreate::AccessPrograms, ?background: bool?, ?context_management: ::Array[OpenAI::Responses::ResponsesClientEvent::ResponseCreate::ContextManagement]?, ?conversation: OpenAI::Models::Responses::ResponsesClientEvent::ResponseCreate::conversation?, @@ -700,6 +713,70 @@ module OpenAI ?user: String } + type access_programs = + { + ?cyber: OpenAI::Models::Responses::ResponsesClientEvent::ResponseCreate::AccessPrograms::cyber + } + + class AccessPrograms < OpenAI::Internal::Type::BaseModel + # The Cyber access program to use for this request. Supported values are + # `standard`, `daybreak_blue`, and `daybreak_red`. If omitted, the API resolves + # the program from the model's Cyber tier and your organization and project + # access, subject to model-specific eligibility restrictions. By default, models + # without a Cyber tier use Standard. Blue-tier models use Daybreak Blue when + # authorized; otherwise they fall back to Standard unless the model requires + # Daybreak access. Red-tier models use Daybreak Red and require authorization. + # Requests that require unavailable Daybreak access return 403. An implicit + # Standard fallback is represented by null in the response's access_programs + # field, rather than an explicit Standard selection. + attr_reader cyber: OpenAI::Models::Responses::ResponsesClientEvent::ResponseCreate::AccessPrograms::cyber? + + # The Cyber access program to use for this request. Supported values are + # `standard`, `daybreak_blue`, and `daybreak_red`. If omitted, the API resolves + # the program from the model's Cyber tier and your organization and project + # access, subject to model-specific eligibility restrictions. By default, models + # without a Cyber tier use Standard. Blue-tier models use Daybreak Blue when + # authorized; otherwise they fall back to Standard unless the model requires + # Daybreak access. Red-tier models use Daybreak Red and require authorization. + # Requests that require unavailable Daybreak access return 403. An implicit + # Standard fallback is represented by null in the response's access_programs + # field, rather than an explicit Standard selection. + def cyber=: ( + OpenAI::Models::Responses::ResponsesClientEvent::ResponseCreate::AccessPrograms::cyber + ) -> OpenAI::Models::Responses::ResponsesClientEvent::ResponseCreate::AccessPrograms::cyber + + # @param cyber + # The Cyber access program to use for this request. Supported values are + # `standard`, `daybreak_blue`, and `daybreak_red`. If omitted, the API resolves + # the program from the model's Cyber tier and your organization and project + # access, subject to model-specific eligibility restrictions. By default, models + # without a Cyber tier use Standard. Blue-tier models use Daybreak Blue when + # authorized; otherwise they fall back to Standard unless the model requires + # Daybreak access. Red-tier models use Daybreak Red and require authorization. + # Requests that require unavailable Daybreak access return 403. An implicit + # Standard fallback is represented by null in the response's access_programs + # field, rather than an explicit Standard selection. + def initialize: ( + ?cyber: OpenAI::Models::Responses::ResponsesClientEvent::ResponseCreate::AccessPrograms::cyber + ) -> void + + def to_hash: -> { + ?cyber: OpenAI::Models::Responses::ResponsesClientEvent::ResponseCreate::AccessPrograms::cyber + } + + type cyber = :standard | :daybreak_blue | :daybreak_red + + module Cyber + extend OpenAI::Internal::Type::Enum + + STANDARD: :standard + DAYBREAK_BLUE: :daybreak_blue + DAYBREAK_RED: :daybreak_red + + def self?.values: -> ::Array[OpenAI::Models::Responses::ResponsesClientEvent::ResponseCreate::AccessPrograms::cyber] + end + end + type context_management = { type: String, ?compact_threshold: Integer? } diff --git a/sig/openai/resources/beta/responses.rbs b/sig/openai/resources/beta/responses.rbs index ee04de3da..b7da890d8 100644 --- a/sig/openai/resources/beta/responses.rbs +++ b/sig/openai/resources/beta/responses.rbs @@ -7,6 +7,7 @@ module OpenAI attr_reader input_tokens: OpenAI::Resources::Beta::Responses::InputTokens def create: ( + ?access_programs: OpenAI::Beta::ResponseCreateParams::AccessPrograms, ?background: bool?, ?context_management: ::Array[OpenAI::Beta::ResponseCreateParams::ContextManagement]?, ?conversation: OpenAI::Models::Beta::ResponseCreateParams::conversation?, @@ -43,6 +44,7 @@ module OpenAI ) -> OpenAI::Beta::BetaResponse def stream_raw: ( + ?access_programs: OpenAI::Beta::ResponseCreateParams::AccessPrograms, ?background: bool?, ?context_management: ::Array[OpenAI::Beta::ResponseCreateParams::ContextManagement]?, ?conversation: OpenAI::Models::Beta::ResponseCreateParams::conversation?, diff --git a/sig/openai/resources/responses.rbs b/sig/openai/resources/responses.rbs index 3ac72a7d4..7ef743a78 100644 --- a/sig/openai/resources/responses.rbs +++ b/sig/openai/resources/responses.rbs @@ -6,6 +6,7 @@ module OpenAI attr_reader input_tokens: OpenAI::Resources::Responses::InputTokens def create: ( + ?access_programs: OpenAI::Responses::ResponseCreateParams::AccessPrograms, ?background: bool?, ?context_management: ::Array[OpenAI::Responses::ResponseCreateParams::ContextManagement]?, ?conversation: OpenAI::Models::Responses::ResponseCreateParams::conversation?, @@ -40,6 +41,7 @@ module OpenAI ) -> OpenAI::Responses::Response def stream_raw: ( + ?access_programs: OpenAI::Responses::ResponseCreateParams::AccessPrograms, ?background: bool?, ?context_management: ::Array[OpenAI::Responses::ResponseCreateParams::ContextManagement]?, ?conversation: OpenAI::Models::Responses::ResponseCreateParams::conversation?, @@ -75,6 +77,7 @@ module OpenAI | OpenAI::Streaming::UnknownStreamEvent)] def stream: ( + ?access_programs: OpenAI::Responses::ResponseCreateParams::AccessPrograms, ?background: bool?, ?include: ::Array[OpenAI::Models::Responses::response_includable]?, ?input: OpenAI::Models::Responses::ResponseCreateParams::input, @@ -156,6 +159,7 @@ module OpenAI module ConnectionResources class Response def create: ( + ?access_programs: OpenAI::Responses::ResponsesClientEvent::ResponseCreate::AccessPrograms, ?background: bool?, ?context_management: ::Array[OpenAI::Responses::ResponsesClientEvent::ResponseCreate::ContextManagement]?, ?conversation: OpenAI::Models::Responses::ResponsesClientEvent::ResponseCreate::conversation?, diff --git a/test/openai/resources/beta/responses_test.rb b/test/openai/resources/beta/responses_test.rb index 39b88486d..a1631185f 100644 --- a/test/openai/resources/beta/responses_test.rb +++ b/test/openai/resources/beta/responses_test.rb @@ -13,6 +13,7 @@ def test_create assert_pattern do response => { id: String, + access_programs: OpenAI::Beta::BetaResponse::AccessPrograms | nil, created_at: Float, error: OpenAI::Beta::BetaResponseError | nil, incomplete_details: OpenAI::Beta::BetaResponse::IncompleteDetails | nil, @@ -61,6 +62,7 @@ def test_retrieve assert_pattern do response => { id: String, + access_programs: OpenAI::Beta::BetaResponse::AccessPrograms | nil, created_at: Float, error: OpenAI::Beta::BetaResponseError | nil, incomplete_details: OpenAI::Beta::BetaResponse::IncompleteDetails | nil, @@ -117,6 +119,7 @@ def test_cancel assert_pattern do response => { id: String, + access_programs: OpenAI::Beta::BetaResponse::AccessPrograms | nil, created_at: Float, error: OpenAI::Beta::BetaResponseError | nil, incomplete_details: OpenAI::Beta::BetaResponse::IncompleteDetails | nil, diff --git a/test/openai/resources/responses_test.rb b/test/openai/resources/responses_test.rb index 3c996dd56..fb84b0cf1 100644 --- a/test/openai/resources/responses_test.rb +++ b/test/openai/resources/responses_test.rb @@ -13,6 +13,7 @@ def test_create assert_pattern do response => { id: String, + access_programs: OpenAI::Responses::Response::AccessPrograms | nil, created_at: Float, error: OpenAI::Responses::ResponseError | nil, incomplete_details: OpenAI::Responses::Response::IncompleteDetails | nil, @@ -61,6 +62,7 @@ def test_retrieve assert_pattern do response => { id: String, + access_programs: OpenAI::Responses::Response::AccessPrograms | nil, created_at: Float, error: OpenAI::Responses::ResponseError | nil, incomplete_details: OpenAI::Responses::Response::IncompleteDetails | nil, @@ -117,6 +119,7 @@ def test_cancel assert_pattern do response => { id: String, + access_programs: OpenAI::Responses::Response::AccessPrograms | nil, created_at: Float, error: OpenAI::Responses::ResponseError | nil, incomplete_details: OpenAI::Responses::Response::IncompleteDetails | nil,