Skip to content

[Infra] v1.81.13-nightly Change Copy to main#21357

Merged
yuneng-jiang merged 7 commits intomainfrom
release_feb16_copy
Feb 17, 2026
Merged

[Infra] v1.81.13-nightly Change Copy to main#21357
yuneng-jiang merged 7 commits intomainfrom
release_feb16_copy

Conversation

@yuneng-jiang
Copy link
Copy Markdown
Contributor

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
  • 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
  • I have requested a Greptile review by commenting @greptileai and received a Confidence Score of at least 4/5 before requesting a maintainer review

CI (LiteLLM team)

CI status guideline:

  • 50-55 passing tests: main is stable with minor issues.
  • 45-49 passing tests: acceptable but needs attention
  • <= 40 passing tests: unstable; be careful with your merges and assess the risk.
  • Branch creation CI run
    Link:

  • CI run for the last commit
    Link:

  • Merge / cherry-pick CI run
    Links:

Type

🚄 Infrastructure

Changes

@vercel
Copy link
Copy Markdown

vercel bot commented Feb 17, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
litellm Building Building Preview, Comment Feb 17, 2026 4:15am

Request Review

@yuneng-jiang yuneng-jiang merged commit 3b5096d into main Feb 17, 2026
11 of 22 checks passed
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Feb 17, 2026

Greptile Summary

Nightly release v1.81.13 that fixes a key regeneration bug and stabilizes multiple test suites.

  • Key regeneration bug fix: Removes duplicated logic in regenerate_key_fn that conflicted with the _execute_virtual_key_regeneration helper. The old code generated two separate tokens — one in the caller and one in the helper — causing _insert_deprecated_key to reference a token hash that never persisted to the DB. The deprecated key insertion is now correctly consolidated into the helper function.
  • Test stabilization: Multiple test files updated to handle importlib.reload(litellm) in conftest by using instance-level mocking, module reloads, and selective environment variable management instead of clear=True on patch.dict.
  • Responses API validation: Allows reasoning field to be None in addition to dict, fixing validation failures for providers that return null reasoning.
  • Docs: Adds BEDROCK_MIN_THINKING_BUDGET_TOKENS environment variable documentation.
  • Version bump: 1.81.12 → 1.81.13

Confidence Score: 4/5

  • This PR is safe to merge — it fixes a real bug in key regeneration and stabilizes tests without introducing new risk.
  • The key management change is a correct deduplication that fixes a real bug where two different tokens were generated during key regeneration. The test changes are all focused on CI stability (handling conftest module reloads, environment isolation). No new features or risky logic introduced. Score of 4 rather than 5 because the key management refactoring touches critical auth infrastructure and the PR lacks dedicated tests for the fix itself.
  • litellm/proxy/management_endpoints/key_management_endpoints.py — the key regeneration refactoring touches critical auth infrastructure and should be validated with integration tests covering the grace period deprecated key flow.

Important Files Changed

Filename Overview
litellm/proxy/management_endpoints/key_management_endpoints.py Fixes a key regeneration bug: removes duplicated logic from regenerate_key_fn that conflicted with _execute_virtual_key_regeneration, and moves _insert_deprecated_key into the helper function. The old code generated two different tokens causing the deprecated key to reference a wrong hash.
docs/my-website/docs/proxy/config_settings.md Adds documentation for the new BEDROCK_MIN_THINKING_BUDGET_TOKENS environment variable with clear description and default value.
pyproject.toml Version bump from 1.81.12 to 1.81.13 in both poetry and commitizen sections.
tests/llm_responses_api_testing/base_responses_api.py Allows reasoning field in responses API validation to be None in addition to dict, fixing validation failures when providers return null reasoning.
tests/test_litellm/containers/test_container_integration.py Adds importlib.reload pattern to test_provider_support to handle stale module references caused by conftest reloading litellm, matching the existing pattern in test_error_handling_integration.
tests/test_litellm/llms/meta_llama/test_meta_llama_chat_transformation.py Replaces a complex async mock-based streaming test with a simpler synchronous test that directly verifies follow_redirects=True on the httpx clients used by BaseOpenAILLM. More reliable and tests the actual behavior.
tests/test_litellm/llms/publicai/test_publicai_chat_transformation.py Adds mocking of supports_function_calling in two tests to prevent failures when the test model name 'swiss-ai-apertus' isn't in the model registry.
tests/test_litellm/llms/vertex_ai/rerank/test_vertex_ai_rerank_transformation.py Adds VERTEXAI_CREDENTIALS and VERTEX_AI_CREDENTIALS to env cleanup list; switches from class-level @patch to instance-level mocking to avoid class-reference issues from importlib.reload(litellm) in conftest.
tests/test_litellm/proxy/test_proxy_cli.py Fixes test_run_server_no_config_passed to avoid clear=True on patch.dict(os.environ) which stripped PATH/HOME in CI. Now selectively removes DB-related env vars and adds mock for litellm.proxy.proxy_server module. Also adds detailed assertion messages.

Flowchart

flowchart TD
    A[regenerate_key_fn] --> B{Is master key?}
    B -->|Yes| C[_rotate_master_key]
    B -->|No| D[Permission checks]
    D --> E[Normalize litellm_changed_by]
    E --> F[_persist_deleted_verification_tokens]
    F --> G[_execute_virtual_key_regeneration]
    G --> G1[get_new_token]
    G1 --> G2[prepare_key_update_data]
    G2 --> G3["_insert_deprecated_key (NEW - moved here)"]
    G3 --> G4[DB update: litellm_verificationtoken]
    G4 --> G5[_delete_cache_key_object]
    G5 --> G6[async_key_rotated_hook]
    G6 --> H[Return GenerateKeyResponse]

    style G3 fill:#4CAF50,color:#fff
Loading

Last reviewed commit: 3669d54

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

9 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@yuneng-jiang yuneng-jiang deleted the release_feb16_copy branch February 19, 2026 18:58
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