Skip to content

Instantly share code, notes, and snippets.

@DougAnderson444
Created February 15, 2026 02:36
Show Gist options
  • Select an option

  • Save DougAnderson444/193c042a5be60804530553277dfe0892 to your computer and use it in GitHub Desktop.

Select an option

Save DougAnderson444/193c042a5be60804530553277dfe0892 to your computer and use it in GitHub Desktop.
local tools

LiteLLM - Best as a proxy/router

Unified interface across providers Supports tool_choice parameter Can route to local models (vLLM, Ollama) or cloud APIs Automatic format translation

Run Ollama as the backend, then put LiteLLM in front of it to add proper tool_choice support:

# Terminal 1: Start Ollama
ollama serve

# Terminal 2: LiteLLM proxy
litellm --model ollama/qwen2.5-coder:7b --api_base http://localhost:11434
@DougAnderson444
Copy link
Author

DougAnderson444 commented Feb 15, 2026

use a virtual environment:

python3 -m venv path/to/venv
source path/to/venv/bin/activate
python3 -m pip install xyz

# or use pipx:

pipx install "litellm[proxy]" --python python3.12

@DougAnderson444
Copy link
Author

DougAnderson444 commented Feb 15, 2026

ensure the model is available in ollama

ollama pull qwen3:14b-q4_K_M

ollama ls

litellm --model ollama/qwen3:14b-q4_K_M --api_base http://localhost:11434

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment