Skip to content

Fix: add stop param as supported for openai and azure#21539

Merged
Sameerlite merged 1 commit intomainfrom
litellm_fix_azure_store_param
Feb 19, 2026
Merged

Fix: add stop param as supported for openai and azure#21539
Sameerlite merged 1 commit intomainfrom
litellm_fix_azure_store_param

Conversation

@Sameerlite
Copy link
Copy Markdown
Contributor

@Sameerlite Sameerlite commented Feb 19, 2026

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

🐛 Bug Fix

Changes

config:

model_list:
  - model_name: gpt-4.1-2025-04-14
    litellm_params:
      model: azure/gpt-4.1-2025-04-14
      store: true
  - model_name: gpt-4o  
    litellm_params:  
      model: openai/gpt-4o  
      api_key: os.environ/OPENAI_API_KEY  
      store: true 

image

@vercel
Copy link
Copy Markdown

vercel bot commented Feb 19, 2026

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

Project Deployment Actions Updated (UTC)
litellm Ready Ready Preview, Comment Feb 19, 2026 5:58am

Request Review

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Feb 19, 2026

Greptile Summary

This PR attempts to fix parameter handling for the store parameter (not stop as the title suggests) by moving it from the global OPENAI_CHAT_COMPLETION_PARAMS list to provider-specific supported parameter lists in OpenAI and Azure configs.

Key Issues

  • Critical: Removing store from OPENAI_CHAT_COMPLETION_PARAMS breaks the existing test test_store_in_openai_chat_completion_params() added in PR fix: add store to OPENAI_CHAT_COMPLETION_PARAMS #21195, which explicitly asserts "store" in OPENAI_CHAT_COMPLETION_PARAMS
  • Critical: The function get_standard_openai_params() in litellm/utils.py:9042 relies on OPENAI_CHAT_COMPLETION_PARAMS to filter standard OpenAI parameters. Removing store from this list will cause it to be excluded from OpenAI/Azure API calls, breaking the functionality that PR fix: add store to OPENAI_CHAT_COMPLETION_PARAMS #21195 was meant to establish
  • Title mismatch: The PR title says "Fix: add stop param" but the actual changes are for the store parameter

What Changed

  • Removed store from OPENAI_CHAT_COMPLETION_PARAMS in constants.py
  • Added store to Azure's get_supported_openai_params() list
  • Added store to OpenAI's get_supported_openai_params() list
  • Added test test_store_param_passed_through_openai_azure() to verify parameter passing
  • Minor whitespace cleanup in Azure transformation file

Architecture Concern

The approach creates conflicting parameter handling logic. The global OPENAI_CHAT_COMPLETION_PARAMS list is used by get_standard_openai_params() to identify OpenAI parameters, while provider-specific configs have their own lists. This PR removes store from the global list but adds it to provider-specific lists, which may break the parameter filtering pipeline.

Confidence Score: 1/5

  • This PR has critical issues that will break existing tests and functionality
  • Removing store from OPENAI_CHAT_COMPLETION_PARAMS will break the test added in PR fix: add store to OPENAI_CHAT_COMPLETION_PARAMS #21195 and cause get_standard_openai_params() to filter out the store parameter for OpenAI/Azure calls, which contradicts the stated purpose of fixing the parameter handling
  • litellm/constants.py needs immediate attention - the removal of store will break existing functionality and tests

Important Files Changed

Filename Overview
litellm/constants.py Removed store from OPENAI_CHAT_COMPLETION_PARAMS - this could be problematic as it may break functionality added in PR #21195
litellm/llms/azure/chat/gpt_transformation.py Added store to Azure's supported params list and removed trailing whitespace
litellm/llms/openai/chat/gpt_transformation.py Added store to OpenAI's supported params list
tests/llm_translation/test_optional_params.py Added comprehensive test for store parameter passing through OpenAI and Azure providers

Last reviewed commit: 44a68cf

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.

4 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Comment on lines 578 to 581
"thinking",
"web_search_options",
"service_tier",
"store",
"prompt_cache_key",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Removing store from OPENAI_CHAT_COMPLETION_PARAMS will break the existing test test_store_in_openai_chat_completion_params() added in PR #21195 (litellm/constants.py:581). This test explicitly checks assert "store" in OPENAI_CHAT_COMPLETION_PARAMS and will fail.

Additionally, get_standard_openai_params() relies on this list to identify standard OpenAI parameters. Removing store means it will be filtered out when calling OpenAI/Azure, breaking the functionality that PR #21195 was supposed to fix.

@Sameerlite Sameerlite merged commit 8bcca90 into main Feb 19, 2026
67 of 84 checks passed
@ishaan-berri ishaan-berri deleted the litellm_fix_azure_store_param branch March 26, 2026 22:29
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