Switch to GitHub models API for embeddings requests#28
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR switches from using the Azure AI inference endpoint to the GitHub Models API for embeddings requests. The change migrates all sample code and documentation to use the new GitHub Models API endpoint, which now supports embeddings functionality.
- Updates endpoint URLs from
https://models.inference.ai.azure.comtohttps://models.github.ai/inference - Adds user agent header to OpenAI client configuration for better API tracking
- Updates environment documentation to clarify required token permissions
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| samples/python/openai/multi_turn.py | Adds GitHub Models sample user agent header to OpenAI client |
| samples/python/openai/embeddings_getting_started.ipynb | Updates OpenAI base URL to GitHub Models API endpoint |
| samples/python/openai/embeddings.py | Changes endpoint from Azure AI to GitHub Models API |
| samples/python/mistralai/getting_started.ipynb | Updates endpoint URL to GitHub Models API |
| samples/python/azure_ai_inference/getting_started.ipynb | Changes endpoint to GitHub Models API |
| samples/python/azure_ai_inference/embeddings.py | Updates endpoint URL to GitHub Models API |
| samples/js/openai/embeddings.js | Changes endpoint from Azure AI to GitHub Models API |
| samples/js/azure_ai_inference/embeddings.js | Updates endpoint URL to GitHub Models API |
| cookbooks/python/llamaindex/rag_getting_started.ipynb | Updates OpenAI base URL to GitHub Models API |
| .env-sample | Adds clarification about required token permissions |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
cschleiden
approved these changes
Jul 16, 2025
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.
The GitHub Models API now supports
/embeddings. This PR switches over to using the GitHub Models API.