Skip to content

docs: add README guidance for experimental APIs#1123

Open
Rohan5commit wants to merge 1 commit into
openai:mainfrom
Rohan5commit:docs/readme-experimental-guidance-20260425
Open

docs: add README guidance for experimental APIs#1123
Rohan5commit wants to merge 1 commit into
openai:mainfrom
Rohan5commit:docs/readme-experimental-guidance-20260425

Conversation

@Rohan5commit
Copy link
Copy Markdown
Contributor

Summary

  • Adds a focused README section that explains how experimental APIs surface compiler warnings.
  • Documents the current warning codes and how to suppress them narrowly when warnings are treated as errors.

Related issue

Guideline alignment

  • Single-file README change
  • No generated files touched
  • No behavior changes

Validation

  • git diff --check

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f3b40e830e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread README.md
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new README section to explain how [Experimental] APIs in this SDK surface compiler warnings, which warning codes exist, and how to suppress them when warnings are treated as errors.

Changes:

  • Adds an “Experimental APIs” subsection under Getting started → Prerequisites.
  • Documents OPENAI001/OPENAI002 and shows a #pragma warning suppression example.

Comment thread README.md
Comment on lines +50 to +51
| `OPENAI001` | Assistants, vector stores, batches, evals, realtime client entry points, and other preview client surface area |
| `OPENAI002` | Realtime session types and session options |
Copy link

Copilot AI Apr 25, 2026

Choose a reason for hiding this comment

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

The OPENAI001 row lists “realtime client entry points”, but RealtimeClient/OpenAIClient.GetRealtimeClient() are tagged [Experimental("OPENAI002")] (e.g., src/Generated/RealtimeClient.cs:15, src/Custom/OpenAIClient.cs:327). This is likely to mislead users about which warning they need to suppress; consider moving realtime client/entry points to the OPENAI002 row (or removing realtime from OPENAI001).

Suggested change
| `OPENAI001` | Assistants, vector stores, batches, evals, realtime client entry points, and other preview client surface area |
| `OPENAI002` | Realtime session types and session options |
| `OPENAI001` | Assistants, vector stores, batches, evals, and other preview client surface area |
| `OPENAI002` | Realtime client entry points, realtime session types, and session options |

Copilot uses AI. Check for mistakes.
Comment thread README.md
Comment on lines +48 to +53
| Warning code | Examples of affected API areas |
| --- | --- |
| `OPENAI001` | Assistants, vector stores, batches, evals, realtime client entry points, and other preview client surface area |
| `OPENAI002` | Realtime session types and session options |

If your project treats warnings as errors, experimental APIs can fail the build until you suppress the relevant warning in the narrowest possible scope:
Copy link

Copilot AI Apr 25, 2026

Choose a reason for hiding this comment

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

This section enumerates experimental warning codes, but the public API also uses other [Experimental] diagnostic IDs like SCME0002 (e.g., settings/DI entry points in src/Custom/*ClientSettings.cs). Either include these in the table or clarify that the table is specifically for OpenAI-defined OPENAI### warnings so users aren’t confused when they encounter SCME0002.

Suggested change
| Warning code | Examples of affected API areas |
| --- | --- |
| `OPENAI001` | Assistants, vector stores, batches, evals, realtime client entry points, and other preview client surface area |
| `OPENAI002` | Realtime session types and session options |
If your project treats warnings as errors, experimental APIs can fail the build until you suppress the relevant warning in the narrowest possible scope:
The table below lists the OpenAI-defined experimental warning codes (`OPENAI###`) used by this library. Some public APIs may also carry other `[Experimental]` diagnostic IDs from shared infrastructure or supporting packages, such as `SCME0002`.
| Warning code | Examples of affected API areas |
| --- | --- |
| `OPENAI001` | Assistants, vector stores, batches, evals, realtime client entry points, and other preview client surface area |
| `OPENAI002` | Realtime session types and session options |
If your project treats warnings as errors, experimental APIs can fail the build until you suppress the relevant warning code for the API you are using in the narrowest possible scope:

Copilot uses AI. Check for mistakes.
Comment thread README.md
Comment on lines +44 to +45
### Experimental APIs

Copy link

Copilot AI Apr 25, 2026

Choose a reason for hiding this comment

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

The README Table of Contents includes “Prerequisites” and then “Install the NuGet package”, but this new “Experimental APIs” subsection isn’t listed. Consider adding it under “Getting started” in the TOC so the new guidance is discoverable.

Copilot uses AI. Check for mistakes.
Comment thread README.md

### Experimental APIs

Some APIs in this library are marked with `[Experimental]` while the corresponding service surface is still evolving. When you use one of these types or members, the compiler emits a warning code so you can opt in deliberately.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

... service surface is still evolving is not quite correct. The intent of [Experimental] is to denote that the client API surface is evolving. It has no connection to the state of the service.

If you'd be so kind, can we revise a bit to something like:

What's Experimental used for?

Experimental is used to designate that the client API surface is still undergoing iteration and should be expected to change, potentially in ways that are breaking. This may include both compile-time and behavioral changes in the client API. To acknowledge this risk, .NET requires that you opt-into experimental features by suppressing the warning in whatever way you prefer.

Once a client API reaches a stable state (no longer tagged experimental) then it is covered by a strong backwards compatibility guarantee. We will not make binary breaking changes and will only make disruptive behavioral changes when there is a critical need, such as patching a security vulnerability.

What Experimental isn't

  • Client use of Experimental does not communicate any message about the feature in the REST API. The OpenAI platform docs are the authoritative source for that information.

  • Client use of Experimental does not communicate any message about the quality or reliability of the feature. We believe that all client features that we release meet our quality bar and are safe and reliable to use in production environments.

  • Client use of Experimental does not communicate any message about supportability of the feature. We support all released client features when used with the official OpenAI service.

Additional context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Docs] Add general information about experimental use to the README

4 participants