* fix(azure): add logprobs support for Azure OpenAI GPT-5 models
Azure OpenAI GPT-5 models (including gpt-5.2) support logprobs
parameters, unlike OpenAI's GPT-5 reasoning models. This fix
overrides the parent class restriction to enable logprobs for Azure.
Changes:
- Override get_supported_openai_params() in AzureOpenAIGPT5Config
- Add "logprobs" and "top_logprobs" to supported params
- Add comprehensive tests for logprobs functionality
Testing:
- Verified with direct Azure API calls to gpt-5.2
- API version: 2025-01-01-preview
- Successfully returns logprobs data
Related: #7974, #4022
* refactor: restrict logprobs support to gpt-5.2 only
Only gpt-5.2 has been verified to support logprobs on Azure.
Other gpt-5 variants (gpt-5, gpt-5.1) have not been tested.
Changes:
- Add conditional check for is_model_gpt_5_2_model()
- Update tests to be specific to gpt-5.2
- Add negative tests for gpt-5 and gpt-5.1
- Update documentation to reflect gpt-5.2 specificity
Added XIAOMI_MIMO to the LlmProviders enum in types/utils.py.
The provider was already configured in providers.json but was
missing from the enum, causing "Unsupported provider" errors
when using it in Router/Proxy configurations.
Also added comprehensive unit tests to prevent regression.
Add support for Z.AI GLM-4.7, latest flagship model with enhanced reasoning capabilities.
Changes:
- Add zai/glm-4.7 to model pricing with /bin/bash.60/M input, .20/M output
- Add cached input pricing (/bin/bash.11/M) for GLM-4.7
- Add supports_reasoning flag to enable thinking parameter
- Update ZAIChatConfig to support thinking parameter for models with reasoning
- Update documentation with GLM-4.7 as latest flagship model
- Add cached input column to pricing table (GLM-4.7 only)
- Add tests for GLM-4.7 reasoning support and cost calculation
- Update all examples to use GLM-4.7
Model specifications:
- Context: 200K input, 128K output
- Supports: reasoning, function calling, tool choice, prompt caching
- Pricing: Same as GLM-4.6 with cache support
See: https://docs.z.ai/guides/llm/glm-4.7
Fix Vertex AI API error: "tools[0].tool_type: one_of 'tool_type' has more
than one initialized field"
The Vertex AI API requires each Tool object to contain exactly one type
of tool (e.g., FunctionDeclaration, GoogleSearch, CodeExecution).
Previously, all tool types were combined into a single Tool object,
causing INVALID_ARGUMENT errors when using multiple tools simultaneously.
This change creates separate Tool objects for each tool type:
- Function declarations in one Tool
- Google Search in its own Tool
- Code Execution in its own Tool
- etc.
Ref: https://cloud.google.com/vertex-ai/generative-ai/docs/reference/rest/v1beta1/Tool🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Fixes#18430
- Pass custom_llm_provider to anthropic_messages_pt instead of hardcoded 'anthropic'
- Add check for vertex_ai provider to force base64 conversion for image URLs
- Add tests to verify behavior for both Vertex AI and regular Anthropic
- Add get_vertex_base_url() helper function to handle regional vs global URLs
- Update _get_embedding_url() to support global location
- Update _get_vertex_url() chat, image_generation, and count_tokens modes
- Add comprehensive test suite with 38 tests covering all endpoint types
- Tests verify both regional and global URL construction
- Maintains 100% backward compatibility