Skip to content

[Architecture] Replace OPENAICUA001 experimental diagnostic with the standard OPENAI001 - #1245

Merged
jsquire merged 1 commit into
openai:mainfrom
jsquire:exp/unify
Jul 10, 2026
Merged

jsquire merged 1 commit into
openai:mainfrom
jsquire:exp/unify

Conversation

@jsquire

@jsquire jsquire commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

The Computer Use (CUA) types were decorated with a separate experimental
diagnostic ID, OPENAICUA001, rather than the standard OPENAI001 used
throughout the rest of the library. This change removes that one-off code so the
Computer Use surface is gated behind the same [Experimental("OPENAI001")]
diagnostic as every other experimental API.

Motivation

Having a dedicated OPENAICUA001 code for a single feature area added friction
for consumers (an extra warning code to suppress) with no offsetting benefit, and
was inconsistent with how the rest of the generated and hand-written surface is
attributed. Consolidating on OPENAI001 simplifies the experimental opt-in story.

Changes

  • Code generator (source of truth): In ExperimentalAttributeVisitor, removed
    the _experimentalCUA001Attribute field, the _OPENAICUA001AttributeTypes set,
    and the corresponding switch branch in VisitType. The affected types now fall
    through to the standard OPENAI001 attribute.

  • Custom (hand-written) code: Updated 8 [Experimental("OPENAICUA001")]
    attributes across 7 files under OpenAI.Responses/src/Custom/**
    (ComputerCallActionKind, ComputerCallActionMouseButton,
    ComputerCallOutputStatus, ComputerCallStatus, ResponseItem,
    ResponseTool, ResponseToolChoice) to OPENAI001.

  • Generated code: Updated the 6 generated model files
    (ComputerCallAction, ComputerCallSafetyCheck, ComputerCallResponseItem,
    ComputerCallOutputResponseItem, ComputerCallOutput, ComputerToolEnvironment)
    to OPENAI001.

  • API listings: Updated api/OpenAI.net10.0.cs and api/OpenAI.net8.0.cs
    (api/OpenAI.netstandard2.0.cs had no occurrences).

  • Build configuration: Removed OPENAICUA001 from both NoWarn lists in
    Directory.Build.props (OPENAI001 was already present).

  • Tests: Updated 4 #pragma warning disable OPENAICUA001 directives to
    OPENAI001 (ContainerMockTests, ResponseStoreTests, ResponsesSmokeTests,
    ResponsesTests).

The focus of these changes is to reclassify the
experimental members under OPENAICUA001 to OPENAI001
to unify for "has not been released to GA scenarios."
@jsquire
jsquire requested a review from m-nash July 10, 2026 17:13
@jsquire jsquire self-assigned this Jul 10, 2026
Copilot AI review requested due to automatic review settings July 10, 2026 17:13
@jsquire jsquire added the area: architecture This item is related to general architecture of the OpenAI client library. label Jul 10, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR standardizes how the Computer Use (CUA) surface is marked as experimental by removing the one-off OPENAICUA001 diagnostic and using the library-wide OPENAI001 experimental diagnostic instead. This reduces consumer friction (one fewer warning code to manage) and makes the Responses CUA types consistent with the rest of the SDK’s experimental gating.

Changes:

  • Updated the code generator’s experimental-attribute logic to stop emitting OPENAICUA001 and fall back to OPENAI001.
  • Replaced all remaining usages of OPENAICUA001 across custom code, generated models, API listings, and test pragmas.
  • Removed OPENAICUA001 from build NoWarn configuration and documented the change in the changelog.

Reviewed changes

Copilot reviewed 16 out of 22 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/Responses/ResponseStoreTests.cs Updates warning suppression to OPENAI001 for experimental API usage in tests.
tests/Responses/ResponsesTests.cs Updates warning suppression to OPENAI001 for experimental API usage in tests.
tests/Responses/ResponsesSmokeTests.cs Updates warning suppression to OPENAI001 for experimental API usage in smoke tests.
tests/Containers/ContainerMockTests.cs Updates warning suppression to OPENAI001 (also normalizes file header/BOM).
OpenAI.Responses/src/Generated/Models/ComputerToolEnvironment.cs Generated model now uses [Experimental("OPENAI001")].
OpenAI.Responses/src/Generated/Models/ComputerCallSafetyCheck.cs Generated model now uses [Experimental("OPENAI001")].
OpenAI.Responses/src/Generated/Models/ComputerCallResponseItem.cs Generated model now uses [Experimental("OPENAI001")].
OpenAI.Responses/src/Generated/Models/ComputerCallOutputResponseItem.cs Generated model now uses [Experimental("OPENAI001")].
OpenAI.Responses/src/Generated/Models/ComputerCallOutput.cs Generated model now uses [Experimental("OPENAI001")].
OpenAI.Responses/src/Generated/Models/ComputerCallAction.cs Generated model now uses [Experimental("OPENAI001")].
OpenAI.Responses/src/Custom/Tools/ResponseToolChoice.cs Custom factory method now uses [Experimental("OPENAI001")].
OpenAI.Responses/src/Custom/Tools/ResponseTool.cs Custom factory method now uses [Experimental("OPENAI001")].
OpenAI.Responses/src/Custom/Items/ResponseItem.cs Custom convenience creators now use [Experimental("OPENAI001")].
OpenAI.Responses/src/Custom/Items/ComputerTool/ComputerCallStatus.cs Custom enum now uses [Experimental("OPENAI001")].
OpenAI.Responses/src/Custom/Items/ComputerTool/ComputerCallOutputStatus.cs Custom enum now uses [Experimental("OPENAI001")].
OpenAI.Responses/src/Custom/Items/ComputerTool/ComputerCallActionMouseButton.cs Custom enum now uses [Experimental("OPENAI001")].
OpenAI.Responses/src/Custom/Items/ComputerTool/ComputerCallActionKind.cs Custom enum now uses [Experimental("OPENAI001")].
Directory.Build.props Removes OPENAICUA001 from NoWarn lists since it is no longer emitted/used.
codegen/generator/src/Visitors/ExperimentalAttributeVisitor.cs Removes special-case OPENAICUA001 handling so CUA types get the standard OPENAI001.
CHANGELOG.md Documents the consolidation/removal and consumer impact (warning suppression code).
api/OpenAI.net8.0.cs Updates exported API listing attributes to OPENAI001.
api/OpenAI.net10.0.cs Updates exported API listing attributes to OPENAI001.

@jsquire
jsquire merged commit 319d66d into openai:main Jul 10, 2026
5 checks passed
@jsquire
jsquire deleted the exp/unify branch July 10, 2026 22:50
rogerbarreto added a commit to rogerbarreto/agent-framework-public that referenced this pull request Oct 30, 2026
OpenAI .NET 2.13.0 gates its computer use types with OPENAI001
(openai/openai-dotnet#1245), so the pragmas in hosting code and its
converter tests were no-ops. OPENAICUA001 now only marks MAF's own
computer tool factories.
rogerbarreto added a commit to rogerbarreto/agent-framework-public that referenced this pull request Oct 30, 2026
OpenAI .NET 2.13.0 retired OPENAICUA001 in favor of OPENAI001
(openai/openai-dotnet#1245). Both FoundryAITool.CreateComputerTool
overloads now use the shared OPENAI001 id, so callers need no extra
suppression; remaining OPENAICUA001 pragmas and NoWarn entries go.
ninglinLiu pushed a commit to ninglinLiu/agent-framework that referenced this pull request Oct 30, 2026
…crosoft#8756)

* feat(dotnet): add GA computer tool factory

- Parameterless FoundryAITool.CreateComputerTool() emits the GA
  {"type":"computer"} tool; the (env, w, h) overload stays preview
- OpenAI .NET 2.13/2.14 has no GA factory, so the tool is read from
  its wire JSON via ModelReaderWriter as a stopgap
- Both overloads use OPENAICUA001 through a shared DiagnosticIds const

* feat(dotnet): map computer items in Foundry hosting

Hosting dropped computer_call and computer_call_output from input and
history, and never emitted the model's computer_call to the caller.

- Convert items between AgentServer and OpenAI models through JSON,
  stripping AgentServer envelope fields and using builder item ids
- Rebuild AgentServer calls without pending_safety_checks, which
  otherwise throw NullReferenceException on serialization (beta.8)

Known blocker, not worked around: OpenAI .NET replays a GA call with
"action": null and "pending_safety_checks": [], both rejected by the
Responses API, so hosted turns after a computer call fail.

* docs(dotnet): add GA computer use sample

Foundry project endpoint rejects {"type":"computer"} today, so the
sample targets public OpenAI with the Foundry setup commented out.

* chore(dotnet): drop stale OPENAICUA001 pragmas

OpenAI .NET 2.13.0 gates its computer use types with OPENAI001
(openai/openai-dotnet#1245), so the pragmas in hosting code and its
converter tests were no-ops. OPENAICUA001 now only marks MAF's own
computer tool factories.

* refactor(dotnet): gate computer tool factories with OPENAI001

OpenAI .NET 2.13.0 retired OPENAICUA001 in favor of OPENAI001
(openai/openai-dotnet#1245). Both FoundryAITool.CreateComputerTool
overloads now use the shared OPENAI001 id, so callers need no extra
suppression; remaining OPENAICUA001 pragmas and NoWarn entries go.

* docs(dotnet): rename computer use samples

GA computer tool is the default going forward, so it takes the
unsuffixed name (Agent_Step27_ComputerUse) and the existing preview
sample becomes Agent_Step15_ComputerUsePreview.

* docs(dotnet): renumber GA computer use sample to Step15.2

Keeps the GA sample next to its preview counterpart, following the
existing Step02.1/Step02.2 numbering.

* docs(dotnet): narrow computer call replay caveat to action

The service rejects a resent GA computer_call for its "action": null,
which is what the known limitation now describes; the known-issue test
asserts only that key.

* fix(dotnet): resend GA computer calls without action

OpenAI .NET models only the preview computer_call and writes
"action": null next to "actions" when a GA call is sent back, which
the Responses API rejects. Foundry hosting resends history on every
turn, so the turn after a computer call failed.

Replayed calls now use a ComputerCallResponseItem subclass that writes
the call JSON as received; typed properties stay available.

* docs(dotnet): move GA computer use sample to Azure providers

The Foundry project Responses endpoint does not accept the GA
computer tool yet, so the GA sample now targets the Azure OpenAI
endpoint with Entra ID as Agent_With_AzureOpenAIResponses_ComputerUse.
The Foundry sample keeps the preview tool as
Agent_Step15_ComputerUsePreview.

* style: Simplify JsonElement qualification

* fix(dotnet): run GA computer sample through Foundry

* fix(dotnet): isolate computer sample assets
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: architecture This item is related to general architecture of the OpenAI client library.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants