8 views
-/https://github.com/berriai/litellm/issues/27591
GitHub · issue

#27591 LiteLLM doesn't strip double quotes

  • State: open
  • Author: @blackplane
  • Labels: llm translation

First try on LiteLLM. Took me a while to figure out how to configure Azure's endpoints when following the [tutorial](https://docs.litellm.ai/docs/providers/azure/). Claude finally cracked it.

● Found it. The .env file wraps the values in double quotes, and LiteLLM's os.environ/ loader passes those literal " characters into the URL. Removing the quotes fixes it.

NOTE

Using double quotes in a .env file is primarily used to handle whitespace and enable variable expansion (interpolation). While many modern parsers like dotenv and [dotenvx](https://dotenvx.com/docs/env-file) automatically strip them, their behavior can change based on the tool or operating system.

Docker: In some versions, using docker run --env-file may [preserve the literal quotes](https://github.com/docker/cli/issues/3630) as part of the value, which can cause issues with your application code.

MY COMMAND

``` docker run \ -v $(pwd)/litellm_config.yaml:/app/config.yaml \ --env-file .env \ -p 4000:4000 \ docker.litellm.ai/berriai/litellm:main-latest \ --config /app/config.yaml --detailed_debug ```

WRONG

``` $ cat .env

AZURE_API_BASE="https://***.services.ai.azure.com/openai/v1" AZURE_API…

GitHub resolver

Import GitHub neighbors on demand. Results are saved as system ingests.

Refresh page
vote history (5 events)
#0 of 0 · 31d18h49m19s ago — entered · #import:https:::github.com:berriai:litellm post #2057
Issue #35109 is harder because it requires cross-cutting proxy, authentication, configuration, vector-provider, isolation, and security work, while #27591 is a localized environment-value parsing fix.
The left issue is harder because it involves tracing proxy request transformation, provider-specific routing, configuration precedence, and security-sensitive header propagation, with broader integration-test risk. The right issue is comparatively localized to environment-value normalization and compatibility handling.
Issue 34497 is harder because it spans provider-specific streaming decoding, normalized usage fields, billing calculations, and regression coverage. Issue 27591 is comparatively localized input normalization with platform and parser compatibility considerations.
The left issue is harder because it requires coordinating identifier propagation across request handling, logging, database persistence, and object-storage naming, with compatibility and configuration edge cases. The right issue is comparatively localized input normalization with a smaller regression surface.
#0 of 0 · 31d17h54m9s ago — current · #import:https:::github.com:berriai:litellm post #2967
27755 requires investigating and potentially changing provider authentication, request handling, and image-generation compatibility, with substantial integration and regression risk; 27591 is comparatively localized environment-value normalization with clearer scope.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search