Skip to content

Conversation

@garman
Copy link
Contributor

@garman garman commented Jul 16, 2025

The GitHub Models API now supports /embeddings. This PR switches over to using the GitHub Models API.

Copilot AI review requested due to automatic review settings July 16, 2025 19:08
Copy link
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

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.com to https://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>
@garman garman merged commit 4e871bb into main Jul 22, 2025
1 check passed
@garman garman deleted the switch-to-github-models-api branch July 22, 2025 13:07
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.

3 participants