Skip to content

Provider adapter: OpenAI-compatible and Ollama local LLM routing #8

Description

@XucroYuri

Context

L2MAS routes agent work through capability names rather than hard-coded model IDs. The MVP already has deterministic mock providers; the next useful step is a real local LLM adapter that can target OpenAI-compatible servers and Ollama.

Target capabilities

  • script.plan
  • quality.review

Scope

Add a provider adapter that can call:

  • OpenAI-compatible local endpoints, including vLLM and LM Studio
  • Ollama HTTP API, either directly or through an OpenAI-compatible bridge

Keep provider selection controlled by config/provider_registry.example.json and ProviderRouter.

Acceptance criteria

  • A local provider can be selected by capability and privacy_mode: local-only.
  • The adapter accepts endpoint/model configuration from the provider registry.
  • The deterministic mock provider remains the default fallback when no local service is running.
  • Unit tests cover provider selection and adapter fallback behavior.
  • Documentation explains how to point the registry at Ollama, vLLM, LM Studio, or llama.cpp-style servers.

Validation

ruff check .
python3 -m py_compile $(rg --files -g '*.py')
python3 -m unittest discover -s tests -v
python3 examples/test_end_to_end.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:local-aiLocal or self-hosted model/runtime supportarea:provider-registryProvider registry, routing, and capability contractsenhancementNew feature or requestgood first issueGood for newcomershelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions