Skip to content

Implement Wiki3 Agent Kernel (M0–M9)#1

Draft
Copilot wants to merge 15 commits into
mainfrom
copilot/wiki3-agent-kernel-project-plan
Draft

Implement Wiki3 Agent Kernel (M0–M9)#1
Copilot wants to merge 15 commits into
mainfrom
copilot/wiki3-agent-kernel-project-plan

Conversation

Copilot AI commented May 11, 2026

Copy link
Copy Markdown

Switch LLM providers to LiteLLM

The previous FakeProvider ran no real LLM code path and LMStudioProvider hand-rolled urllib against /v1/chat/completions. The spec calls for LiteLLM + Instructor + Pydantic, and the idiomatic mock pattern is documented at https://docs.litellm.ai/docs/completion/mock_requests. LM Studio is also a first-class LiteLLM provider via lm_studio/<model>.

  • LiteLLMProvider — thin wrapper around litellm.completion; cost via litellm.completion_cost; usage from ModelResponse.usage.
  • FakeProvider — scripts the canonical mock_response= kwarg (strings populate the assistant message; Exception items are raised). No bespoke wire format.
  • LMStudioProvider — routes through LiteLLM's built-in lm_studio/<model> provider, sets LM_STUDIO_API_BASE / LM_STUDIO_API_KEY, and auto-detects the loaded model from /v1/models via the official openai client when none is specified.
  • __init__.py exports the new LiteLLMProvider alongside the two presets.
  • docs/getting-started.md + examples/05_llm_fake_provider.ipynb updated to describe LiteLLM-shaped usage and auto model selection. examples/ excluded from ruff (notebooks aren't source files).
  • All 5 hermetic M7 tests pass against the new implementation; full suite green (53 passed, 1 skipped — the optional live LM Studio test).
  • Lint + mypy clean on agent_kernel/llm/.
  • parallel_validation — Code Review and CodeQL both clean.

Copilot AI and others added 8 commits May 11, 2026 05:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants