* Fix - add safe divide by 0 for most places to prevent crash
* Enhance MCPRequestHandler to support permission inheritance and intersection logic for access groups. Added integration tests to verify behavior when keys have no permissions and when both keys and teams have overlapping permissions.
* Remove redundant assertions for permission checks in test_user_api_key_auth_mcp.py to streamline test logic.
* Refactor integration tests for MCPRequestHandler to simplify mocking. Replace complex database mocks with direct function mocks for permission inheritance and intersection scenarios, improving test clarity and maintainability.
* Revert "Fix - add safe divide by 0 for most places to prevent crash"
This reverts commit 265d40e39051e148996b9fb7f354730c57ff23ac.
* fix intent params
* Add responses
* fix unrelated test
* test fix - fireworks API endpoint is down
* test fix fireworks ai is having an active outage
* test_completion_cost_databricks
* dbrx fix test API currently not responding
* Update OpenAI Realtime handler to use the correct endpoint and include all query parameters. Adjusted error messages for missing API base and key. Updated health check URL construction to pass model as a query parameter.
* Enhance OpenAI Realtime handler tests to ensure model parameter inclusion in WebSocket URL. Added new tests to verify correct URL construction with model and additional parameters, preventing 'missing_model' errors. Updated existing tests for consistency.
* Remove debug print statements for API base and key in OpenAIRealtime handler to clean up the code.
---------
Co-authored-by: Ishaan Jaff <ishaanjaffer0324@gmail.com>
* Fix - add safe divide by 0 for most places to prevent crash
* feat(prometheus): add new metrics for monitoring pod lock manager and spend update queues
* fix(prometheus): specify type for buffer monitoring metrics in PrometheusMetricLabels
* Revert "Fix - add safe divide by 0 for most places to prevent crash"
This reverts commit 265d40e39051e148996b9fb7f354730c57ff23ac.
This update integrates mock user API key authentication into the tag management endpoint tests, ensuring accurate simulation of user roles for creating, updating, and deleting tags. The changes enhance the reliability of the tests by properly setting up user authentication before executing test cases.
This update introduces a helper function to create a mock user API key authentication object, which is utilized in the tag management endpoint tests. The mock authentication is integrated into the test cases for creating, updating, and deleting tags, enhancing the reliability of the tests by simulating user roles accurately.
* Fix - add safe divide by 0 for most places to prevent crash
* mock prisma client
* Revert "Fix - add safe divide by 0 for most places to prevent crash"
This reverts commit 265d40e39051e148996b9fb7f354730c57ff23ac.
* fix(volcengine): handle thinking disabled parameter properly
When thinking is set to {"type": "disabled"} in volcengine provider config,
skip adding the parameter to extra_body entirely instead of passing it through.
This prevents "thinking: undefined" from appearing in request logs.
Fixes#13039
* test(volcengine): fix and enhance thinking parameter tests
- Fixed existing test that expected broken behavior
- Added comprehensive test coverage for all thinking parameter scenarios:
* thinking disabled → omitted from extra_body
* thinking enabled → included in extra_body
* thinking None → included in extra_body as None
* custom thinking values → included in extra_body
* no thinking parameter → empty result
All tests passing, verifying the fix for issue #13039
- Added additional routes for key management operations to the access control logic.
- Improved handling of routes that start with "/key/" and end with "/regenerate" to ensure proper access restrictions.
- Added `forward_client_headers_to_llm_api` setting in the Bedrock documentation to facilitate client-side header forwarding.
- Updated `completion` function to use merged headers instead of original `extra_headers`.
- Improved request handling in `BedrockConverseLLM` and `AmazonInvokeConfig` to ensure proper header management for `anthropic-beta` parameters.
- Refactored request transformation logic to return the transformed request for better clarity and functionality.
- Renamed `AmazonAnthropicClaude3MessagesConfig` to `AmazonAnthropicClaudeMessagesConfig` in the test file to align with recent refactoring.
- Adjusted the instantiation of the configuration class in the test to reflect the new naming convention.
- Updated test cases to use the renamed `AmazonAnthropicClaudeConfig` instead of `AmazonAnthropicClaude3Config` for consistency with recent changes.
- Adjusted imports and assertions in test files to reflect the new configuration class name.
- Renamed `AmazonAnthropicClaude3Config` and `AmazonAnthropicClaude3MessagesConfig` to `AmazonAnthropicClaudeConfig` and `AmazonAnthropicClaudeMessagesConfig` respectively for consistency.
- Implemented `get_anthropic_beta_from_headers` function to extract and handle `anthropic-beta` headers across various transformations.
- Updated request transformations in `AmazonConverseConfig` and `AmazonInvokeConfig` to include `anthropic_beta` parameters based on user headers.
- Added tests to ensure proper handling of `anthropic_beta` headers in different scenarios.
- Consolidated access control logic into a new static method `_check_proxy_admin_viewer_access`.
- Improved readability and maintainability by reducing code duplication in route access checks.
- Ensured proper handling of write operations and parameter validation for management routes.