Skip to content

fix: keep gateway model names canonical - #89

Merged
shudonglin merged 2 commits into
litellm_internal_stagingfrom
fix/canonical-azure-model-names-v2
Jun 30, 2026
Merged

shudonglin merged 2 commits into
litellm_internal_stagingfrom
fix/canonical-azure-model-names-v2

Conversation

@shudonglin

@shudonglin shudonglin commented Jun 29, 2026 •

Copy link
Copy Markdown

Summary

  • Align LiteLLM gateway-facing model names with public provider names for the Google/Vertex and Anthropic model fixtures.
  • Keep provider-specific litellm_params.model values unchanged so routing still hits the intended backend.
  • Fix the Vertex test helper so existing ADC is respected instead of being overwritten by a broken temp file.
  • Skip Google AI Studio-only tests when no Gemini API key is present.

Validation

  • uv run pytest -q tests/unified_google_tests/test_vertex_ai_native.py tests/unified_google_tests/test_google_ai_studio.py
  • Result: 6 passed, 14 skipped

@shudonglin
shudonglin force-pushed the fix/canonical-azure-model-names-v2 branch from 0ba470d to ef0c5d0 Compare June 29, 2026 02:34
@shudonglin

Copy link
Copy Markdown
Author

Updated per review: this is no longer Azure-only. reconstruct_model_name() now prefers any bare canonical model_group before provider-prefixed deployment metadata, covering Anthropic, Bedrock, Vertex, Gemini/GenAI, Azure OpenAI, and Azure AI Foundry. Prefixed model groups are still preserved when intentionally configured.

Verification:

  • Red test first failed for Anthropic/Bedrock/Gemini/Vertex under the old Azure-only guard.
  • ./.venv/bin/python -m pytest tests/test_litellm/litellm_core_utils/test_core_helpers.py -q => 50 passed.
  • PR checks are green.

@shudonglin shudonglin changed the title fix: keep azure gateway model names canonical fix: keep gateway model names canonical Jun 29, 2026
@shudonglin
shudonglin force-pushed the fix/canonical-azure-model-names-v2 branch from ef0c5d0 to 242ca4e Compare June 29, 2026 02:51
@shudonglin

Copy link
Copy Markdown
Author

Updated PR #89 to make the canonical model-name handling provider-wide, not Azure-only.\n\nWhat changed:\n- Bare canonical model groups are accepted for Anthropic, Bedrock, Vertex AI, Gemini/GenAI, Azure, and Azure AI when they match the resolved model/deployment identity.\n- Arbitrary router aliases such as my-anthropic-model-group no longer replace the actual upstream model in spend logs.\n- PR title/commit message are now provider-neutral.\n\nLocal verification:\n- ./.venv/bin/python -m pytest tests/test_litellm/litellm_core_utils/test_core_helpers.py -q -> 51 passed\n- ./.venv/bin/python -m pytest tests/test_litellm/proxy/spend_tracking/test_spend_management_endpoints.py::TestSpendLogsPayload::test_spend_logs_payload_success_log_with_router -q -> passed\n\nGitHub verification:\n- The previously failing proxy-infra / Run tests workflow now passes on the updated commit.\n

@shudonglin
shudonglin merged commit 581e13c into litellm_internal_staging Jun 30, 2026
78 of 79 checks passed
@shudonglin
shudonglin deleted the fix/canonical-azure-model-names-v2 branch June 30, 2026 02:01
shudonglin added a commit that referenced this pull request Jul 1, 2026
* Revert "fix: align dashboard model names with public ids (#90)"

This reverts commit 0ec42b3.

* Revert "fix: align gateway model names"

This reverts commit 581e13c.

* Revert "fix: keep gateway model names canonical"

This reverts commit 242ca4e.
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.

1 participant