Skip to content

Replace Azure Inference URL with GitHub Models API URL #235

@pamelafox

Description

@pamelafox

Issue Description

This repository contains references to the old Azure inference URL that should be updated to use the new GitHub Models API endpoint.

Current URL

https://models.inference.ai.azure.com

New URL

https://models.github.ai/inference

Why change is needed

For GitHub Models API, the Azure inference endpoint is being deprecated:
https://github.blog/changelog/2025-07-17-deprecation-of-azure-endpoint-for-github-models/

Action required

  • For all files that support GitHub Models, replace all instances of https://models.inference.ai.azure.com with https://models.github.ai/inference in the affected files.
  • If there is a model name that is being used with GitHub Models in the code, like "gpt-4o", change that model name to "openai/gpt-4o" instead - put "openai/" in front.

For example, this new code would be correct when using GitHub Models with OpenAI:

if API_HOST == "github":
client = openai.OpenAI(
base_url="https://models.github.ai/inference",
api_key=os.environ["GITHUB_TOKEN"],
)
MODEL_NAME = os.getenv("GITHUB_MODEL", "openai/gpt-4o")

Details

Pattern: https://models.inference.ai.azure.com

Found matches in 2 file(s) with 3 total match(es):

File: src/backend/fastapi_app/openai_clients.py

  • Line 57: github_base_url = os.getenv("GITHUB_BASE_URL", "https://models.inference.ai.azure.com")

  • Line 117: github_base_url = os.getenv("GITHUB_BASE_URL", "https://models.inference.ai.azure.com")

File: .env.sample

  • Line 40: GITHUB_BASE_URL=https://models.inference.ai.azure.com

Repository: https://github.com/Azure-Samples/rag-postgres-openai-python


This issue was automatically created by the GitHub Repo Maintainer Agent.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions