Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 7 additions & 10 deletions docs/agents/models.md
Original file line number Diff line number Diff line change
Expand Up @@ -315,22 +315,19 @@ layer, providing a standardized, OpenAI-compatible interface to over 100+ LLMs.
)
```

!!!info "Note for Windows users"
!!!warning "Windows Encoding Note for LiteLLM"

When using ADK agents with LiteLLM on Windows, you might encounter a `UnicodeDecodeError`. This error occurs because LiteLLM may attempt to read cached files using the default Windows encoding (`cp1252`) instead of UTF-8.

To prevent this, we recommend setting the `PYTHONUTF8` environment variable to `1`. This forces Python to use UTF-8 for all file I/O.

### Avoiding LiteLLM UnicodeDecodeError on Windows
When using ADK agents with LiteLlm on Windows, users might encounter the following error:
```
UnicodeDecodeError: 'charmap' codec can't decode byte...
```
This issue occurs because `litellm` (used by LiteLlm) reads cached files (e.g., model pricing information) using the default Windows encoding (`cp1252`) instead of UTF-8.
Windows users can prevent this issue by setting the `PYTHONUTF8` environment variable to `1`. This forces Python to use UTF-8 globally.
**Example (PowerShell):**
```powershell
# Set for current session
# Set for the current session
$env:PYTHONUTF8 = "1"

# Set persistently for the user
[System.Environment]::SetEnvironmentVariable('PYTHONUTF8', '1', [System.EnvironmentVariableTarget]::User)
Applying this setting ensures that Python reads cached files using UTF-8, avoiding the decoding error.
```


Expand Down