Skip to content

feat(llm): vendor-neutral LLM provider surface + plugin hook - #425

Draft
haileyok wants to merge 1 commit into
mainfrom
hailey/ask-ai-1-provider
Draft

feat(llm): vendor-neutral LLM provider surface + plugin hook#425
haileyok wants to merge 1 commit into
mainfrom
hailey/ask-ai-1-provider

Conversation

@haileyok

Copy link
Copy Markdown
Member

Description

Part 1/5 of the reusable Ask AI stack (base: main). Ports a vendor-neutral LLM provider surface into osprey_worker/lib/llm (message/tool/response types, BaseLLMProvider, ToolRegistry, bounded run_tool_loop) and makes providers discoverable via the existing Pluggy path: a new register_llm_provider hookspec (firstresult=True) + bootstrap_llm_provider (returns None on absence). Adds a runnable Anthropic example provider in example_plugins, registered via hookimpl, with the anthropic SDK confined to example_plugins (never core). Implements AC1.1–AC1.6.

Checklist

  • Tests pass locally (37 tests via ./run-tests.sh)
  • uv run ruff check . passes
  • uv tool run fawltydeps --check-unused --pyenv .venv passes
  • Updated CHANGELOG.md (deferred — happy to add)

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: f2059e15-9caa-4517-aa13-f3be79da8b95

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch hailey/ask-ai-1-provider

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

…pic example

Port Leon's lib/llm provider surface (message/tool/response types, BaseLLMProvider,
ToolRegistry, run_tool_loop) into osprey_worker. Add register_llm_provider hookspec
(firstresult) and bootstrap_llm_provider (returns None on provider absence). Add an
Anthropic example provider in example_plugins, registered via hookimpl; the anthropic
SDK dependency is confined to example_plugins (not core).

Tests (37 passing under run-tests.sh): provider surface, tool registry/loop, plugin
discovery/absence, and Anthropic request/response mapping.

Implements osprey-ask-ai AC1.1-AC1.6.
@haileyok
haileyok force-pushed the hailey/ask-ai-1-provider branch from 3917584 to f2f422c Compare July 14, 2026 22:13
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.

1 participant