Skip to content

docs: add README guidance for experimental APIs#1125

Closed
Rohan5commit wants to merge 1 commit into
openai:mainfrom
Rohan5commit:docs/readme-experimental-apis-20260427
Closed

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

Conversation

@Rohan5commit
Copy link
Copy Markdown
Contributor

Summary

  • add a README section that explains how experimental APIs surface OPENAI001 and OPENAI002 warnings
  • document both local pragma suppression and project-wide NoWarn configuration for warnings-as-errors builds

Related issue

Guideline alignment

  • keeps the change to a single documentation file with no generated or runtime code changes
  • adds the experimental-use guidance directly where contributors first learn how to install and use the client

Validation

  • ran 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: e435ac0864

ℹ️ 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
var client = new ResponsesClient(
new BearerTokenPolicy(new DefaultAzureCredential(), "https://ai.azure.com/.default"),
new OpenAIClientOptions { Endpoint = new Uri($"{endpoint}/openai/v1/") }
new ResponsesClientOptions { Endpoint = new Uri($"{endpoint}/openai/v1/") }
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Use OpenAIClientOptions in Azure Responses sample

This sample instantiates ResponsesClientOptions, but that type is not defined in the SDK (repo-wide search only finds it in this README), and ResponsesClient constructors take OpenAIClientOptions (see src/Custom/Responses/ResponsesClient.cs around the constructor overloads). As a result, users copying this README snippet will hit a compile-time error before they can run the Azure Responses example.

Useful? React with 👍 / 👎.

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 README guidance for consuming experimental APIs in the OpenAI .NET SDK, including how to suppress OPENAI001/OPENAI002 warnings in both local and project-wide configurations.

Changes:

  • Add a “Working with experimental APIs” section describing OPENAI001/OPENAI002 and suppression approaches (#pragma and NoWarn).
  • Update the Azure OpenAI Entra ID example to use a different options type in the ResponsesClient constructor.

Comment thread README.md

### Working with experimental APIs

Some namespaces in this SDK map to preview or rapidly evolving platform features and are marked with `[Experimental]`. When you call them, the compiler raises an `OPENAI00x` warning so you can decide whether to opt in.
Copy link

Copilot AI Apr 27, 2026

Choose a reason for hiding this comment

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

The text says “Some namespaces … are marked with [Experimental]”, but [Experimental] is applied to types/members (namespaces themselves aren’t attributed). Consider rephrasing to something like “Some APIs/types in this SDK are marked with [Experimental] (often within preview-oriented namespaces) …” so readers aren’t misled about where the attribute is applied.

Suggested change
Some namespaces in this SDK map to preview or rapidly evolving platform features and are marked with `[Experimental]`. When you call them, the compiler raises an `OPENAI00x` warning so you can decide whether to opt in.
Some APIs and types in this SDK map to preview or rapidly evolving platform features and are marked with `[Experimental]` (often within preview-oriented namespaces). When you call them, the compiler raises an `OPENAI00x` warning so you can decide whether to opt in.

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

Some namespaces in this SDK map to preview or rapidly evolving platform features and are marked with `[Experimental]`. When you call them, the compiler raises an `OPENAI00x` warning so you can decide whether to opt in.

The warning codes currently used in this repository are:
Copy link

Copilot AI Apr 27, 2026

Choose a reason for hiding this comment

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

“The warning codes currently used in this repository are:” is inaccurate because the repo also uses other [Experimental] diagnostic IDs (e.g., OPENAICUA001, SCME0001, SCME0002). Either scope the sentence/table to the OPENAI00x codes you’re documenting or include the additional codes so the statement remains true.

Suggested change
The warning codes currently used in this repository are:
The `OPENAI00x` warning codes currently documented for this SDK are:

Copilot uses AI. Check for mistakes.
Comment thread README.md
var client = new ResponsesClient(
new BearerTokenPolicy(new DefaultAzureCredential(), "https://ai.azure.com/.default"),
new OpenAIClientOptions { Endpoint = new Uri($"{endpoint}/openai/v1/") }
new ResponsesClientOptions { Endpoint = new Uri($"{endpoint}/openai/v1/") }
Copy link

Copilot AI Apr 27, 2026

Choose a reason for hiding this comment

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

ResponsesClientOptions doesn’t appear to exist in the SDK (searching the repo only finds it in this README). ResponsesClient constructors take OpenAIClientOptions, and the snippet test tests/Snippets/ReadMeSnippets.cs also uses OpenAIClientOptions, so this example likely won’t compile as written.

Suggested change
new ResponsesClientOptions { Endpoint = new Uri($"{endpoint}/openai/v1/") }
new OpenAIClientOptions { Endpoint = new Uri($"{endpoint}/openai/v1/") }

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator

@jsquire jsquire left a comment

Choose a reason for hiding this comment

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

This is essentially a duplicate of #1123. Closing this out; please consolidate efforts there.

@jsquire jsquire closed this Apr 27, 2026
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

3 participants