Skip to content

Fix test#3

Open
Sameerlite wants to merge 1 commit intolitellm_litellm_team-model-group-name-routing-fixfrom
litellm_litellm_team-model-group-name-routing-fix-2
Open

Fix test#3
Sameerlite wants to merge 1 commit intolitellm_litellm_team-model-group-name-routing-fixfrom
litellm_litellm_team-model-group-name-routing-fix-2

Conversation

@Sameerlite
Copy link
Copy Markdown
Owner

@Sameerlite Sameerlite commented Mar 27, 2026

Title

Relevant issues

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have Added testing in the tests/litellm/ directory, Adding at least 1 test is a hard requirement - see details
  • I have added a screenshot of my new test passing locally
  • My PR passes all unit tests on make test-unit
  • My PR's scope is as isolated as possible, it only solves 1 specific problem

Type

🆕 New Feature
🐛 Bug Fix
🧹 Refactoring
📖 Documentation
🚄 Infrastructure
✅ Test

Changes


Note

Low Risk
Low risk: test-only change, but it reloads litellm.constants repeatedly and could add some runtime/flakiness in CI if constants have import-time side effects.

Overview
Adds test_all_numeric_constants_can_be_overridden, which introspects litellm.constants for all uppercase int/float values, discovers their actual env var names by AST-parsing constants.py (including get_env_int/os.getenv), and asserts each constant changes after setting the env var and reloading the module.

Written by Cursor Bugbot for commit bd59139. This will update automatically on new commits. Configure here.

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

# Verify the value was overridden
assert (
new_value == test_value
), f"Failed to override {name} with environment variable. Expected {test_value}, got {new_value}"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test fails for non-overridable hardcoded numeric constant

Medium Severity

DEFAULT_HEALTH_CHECK_STALENESS_MULTIPLIER in constants.py is hardcoded to 2 with no os.getenv call. The test iterates over all uppercase numeric constants and asserts each can be overridden via an environment variable. Since this constant doesn't read from any env var, reloading the module will always yield 2, causing the assertion to fail when it expects 3.

Fix in Cursor Fix in Web

Sameerlite pushed a commit that referenced this pull request Apr 1, 2026
docs: sidebar QA fixes and index updates
Sameerlite pushed a commit that referenced this pull request Apr 1, 2026
- Skip short-circuit for providers that have a BaseAnthropicMessagesConfig
  (bedrock, vertex_ai, azure_ai, anthropic) — they use the agentic loop
  which includes a follow-up LLM synthesis step. Short-circuiting would
  return raw search text instead of an LLM-synthesized answer.
- Add fallback to litellm.get_llm_provider() for custom_llm_provider
  derivation when litellm_params is overwritten by kwargs.
- Add test for bedrock guard.

Addresses Greptile review comments #3 and #4.
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