From 02e6574566e6f2c1fa86c88bec33c726cf68bf35 Mon Sep 17 00:00:00 2001 From: Sean Goedecke Date: Tue, 8 Jul 2025 08:49:41 +1000 Subject: [PATCH] Update GitHub Models url to the new url (#6759) Co-authored-by: Eric Zhu --- .../ChatCompletionClientAgentTests.cs | 2 +- .../AutoGen.Tests/Orchestrator/RolePlayOrchestratorTests.cs | 2 +- .../src/user-guide/agentchat-user-guide/tutorial/models.ipynb | 2 +- .../src/autogen_ext/models/azure/_azure_ai_client.py | 4 ++-- .../src/autogen_ext/models/azure/config/__init__.py | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dotnet/test/AutoGen.AzureAIInference.Tests/ChatCompletionClientAgentTests.cs b/dotnet/test/AutoGen.AzureAIInference.Tests/ChatCompletionClientAgentTests.cs index 5d2e0721c..5152c8461 100644 --- a/dotnet/test/AutoGen.AzureAIInference.Tests/ChatCompletionClientAgentTests.cs +++ b/dotnet/test/AutoGen.AzureAIInference.Tests/ChatCompletionClientAgentTests.cs @@ -294,7 +294,7 @@ public partial class ChatCompletionClientAgentTests private ChatCompletionsClient CreateChatCompletionClient() { var apiKey = Environment.GetEnvironmentVariable("GH_API_KEY") ?? throw new Exception("Please set GH_API_KEY environment variable."); - var endpoint = "https://models.inference.ai.azure.com"; + var endpoint = "https://models.github.ai/inference"; return new ChatCompletionsClient(new Uri(endpoint), new Azure.AzureKeyCredential(apiKey)); } diff --git a/dotnet/test/AutoGen.Tests/Orchestrator/RolePlayOrchestratorTests.cs b/dotnet/test/AutoGen.Tests/Orchestrator/RolePlayOrchestratorTests.cs index 521cd711a..06b2b6d5f 100644 --- a/dotnet/test/AutoGen.Tests/Orchestrator/RolePlayOrchestratorTests.cs +++ b/dotnet/test/AutoGen.Tests/Orchestrator/RolePlayOrchestratorTests.cs @@ -292,7 +292,7 @@ public class RolePlayOrchestratorTests public async Task LLaMA_3_1_CoderReviewerRunnerTestAsync() { var apiKey = Environment.GetEnvironmentVariable("GH_API_KEY") ?? throw new InvalidOperationException("GH_API_KEY is not set."); - var endPoint = "https://models.inference.ai.azure.com"; + var endPoint = "https://models.github.ai/inference"; var chatCompletionClient = new ChatCompletionsClient(new Uri(endPoint), new Azure.AzureKeyCredential(apiKey)); var agent = new ChatCompletionsClientAgent( diff --git a/python/docs/src/user-guide/agentchat-user-guide/tutorial/models.ipynb b/python/docs/src/user-guide/agentchat-user-guide/tutorial/models.ipynb index 106e727ba..8afd8cce1 100644 --- a/python/docs/src/user-guide/agentchat-user-guide/tutorial/models.ipynb +++ b/python/docs/src/user-guide/agentchat-user-guide/tutorial/models.ipynb @@ -248,7 +248,7 @@ "\n", "client = AzureAIChatCompletionClient(\n", " model=\"Phi-4\",\n", - " endpoint=\"https://models.inference.ai.azure.com\",\n", + " endpoint=\"https://models.github.ai/inference\",\n", " # To authenticate with the model you will need to generate a personal access token (PAT) in your GitHub settings.\n", " # Create your PAT token by following instructions here: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens\n", " credential=AzureKeyCredential(os.environ[\"GITHUB_TOKEN\"]),\n", diff --git a/python/packages/autogen-ext/src/autogen_ext/models/azure/_azure_ai_client.py b/python/packages/autogen-ext/src/autogen_ext/models/azure/_azure_ai_client.py index 3e19af7c0..a783d4965 100644 --- a/python/packages/autogen-ext/src/autogen_ext/models/azure/_azure_ai_client.py +++ b/python/packages/autogen-ext/src/autogen_ext/models/azure/_azure_ai_client.py @@ -220,7 +220,7 @@ class AzureAIChatCompletionClient(ChatCompletionClient): async def main(): client = AzureAIChatCompletionClient( model="Phi-4", - endpoint="https://models.inference.ai.azure.com", + endpoint="https://models.github.ai/inference", # To authenticate with the model you will need to generate a personal access token (PAT) in your GitHub settings. # Create your PAT token by following instructions here: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens credential=AzureKeyCredential(os.environ["GITHUB_TOKEN"]), @@ -258,7 +258,7 @@ class AzureAIChatCompletionClient(ChatCompletionClient): async def main(): client = AzureAIChatCompletionClient( model="Phi-4", - endpoint="https://models.inference.ai.azure.com", + endpoint="https://models.github.ai/inference", # To authenticate with the model you will need to generate a personal access token (PAT) in your GitHub settings. # Create your PAT token by following instructions here: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens credential=AzureKeyCredential(os.environ["GITHUB_TOKEN"]), diff --git a/python/packages/autogen-ext/src/autogen_ext/models/azure/config/__init__.py b/python/packages/autogen-ext/src/autogen_ext/models/azure/config/__init__.py index c90afe897..38cf34b53 100644 --- a/python/packages/autogen-ext/src/autogen_ext/models/azure/config/__init__.py +++ b/python/packages/autogen-ext/src/autogen_ext/models/azure/config/__init__.py @@ -9,7 +9,7 @@ from azure.ai.inference.models import ( from azure.core.credentials import AzureKeyCredential from azure.core.credentials_async import AsyncTokenCredential -GITHUB_MODELS_ENDPOINT = "https://models.inference.ai.azure.com" +GITHUB_MODELS_ENDPOINT = "https://models.github.ai/inference" class JsonSchemaFormat(TypedDict, total=False):