You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Provider for OpenAI-compatible local servers (llama.cpp, vLLM, LM Studio) #10
Problem
Only Ollama is supported for live runs. llama.cpp's llama-server, vLLM, and LM Studio all expose an OpenAI-compatible /v1/chat/completions endpoint locally. One provider would cover all three, and it would also make it possible to compare runtimes against each other.
The provider sends messages: [{"role": "user", "content": case.input}] (with an optional system), and reads choices[0].message.content. It uses the standard library only, like the Ollama provider.
Scope / where src/modeldiff/providers.py, CONFIG_SCHEMA in config.py, build_provider, and the README section on local models. See "Adding a provider" in docs/architecture.md.
Acceptance criteria
No API key is required. If an optional api_key_env is supported, it reads the key from an environment variable, and the key never appears in result files.
Connection errors, HTTP errors, and malformed responses become ProviderError with a clear message.
Usage counts from the response are stored in provider_metadata.
Tests
Mocked urlopen tests modelled on the Ollama tests in tests/test_config_and_providers.py. No running server is needed.
Definition of done
Tests pass, the README is updated, and there is an example config in examples/.
Activity
Add openai_compatible provider for local OpenAI-compatible servers