Python: docs: add OpenAI-compatible control plane example#14054
Open
cerebrixos wants to merge 1 commit into
Open
Python: docs: add OpenAI-compatible control plane example#14054cerebrixos wants to merge 1 commit into
cerebrixos wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds guidance to the Python “Configuring the Kernel” doc for using a custom OpenAI-compatible client (e.g., when routing through a gateway/control plane), and cleans up the Microsoft Entra authentication link formatting.
Changes:
- Document passing a custom OpenAI-compatible
AsyncOpenAIclient intoOpenAIChatCompletion. - Add an example using Tuning Engines’ OpenAI-compatible endpoint.
- Fix formatting of the Microsoft Entra authentication guide link.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+65
to
+67
| You can also pass a custom OpenAI-compatible client to `OpenAIChatCompletion` when your organization routes model calls through a gateway or control plane for centralized model access, policy, audit trails, quota enforcement, or cost reporting. | ||
|
|
||
| For example, [Tuning Engines](https://www.tuningengines.com/) exposes an OpenAI-compatible endpoint: |
Comment on lines
+72
to
+73
| from openai import AsyncOpenAI | ||
| from semantic_kernel.connectors.ai.open_ai import OpenAIChatCompletion |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds a small manual-configuration example showing how to pass a custom AsyncOpenAI client to OpenAIChatCompletion for an OpenAI-compatible gateway or control plane.\n\nWhy this may be useful:\n- Semantic Kernel already supports custom OpenAI clients through the async_client parameter.\n- Production teams often route model traffic through centralized controls for model access, policy, audit trails, quotas, routing, and cost reporting.\n- The example keeps Semantic Kernel responsible for orchestration, functions, plugins, memory, and agents while the external control plane handles organization-wide governance.\n\nThe change is docs-only and uses placeholder environment variables.