Skip to content

feat: add Claude (Anthropic) LLM provider for explain/ask (#35) - #56

Merged
cursor[bot] merged 2 commits into
mainfrom
cursor/claude-llm-provider-1cc6
Aug 17, 2026
Merged

cursor[bot] merged 2 commits into
mainfrom
cursor/claude-llm-provider-1cc6

Conversation

@leo-aa88

Copy link
Copy Markdown
Member

Closes #35

Adds LLM_PROVIDER=claude so explain/ask can call Anthropic's Messages API via raw httpx (no anthropic SDK), matching OpenAI's single HTTP attempt plus G10 ResilientLLMProvider wrap.

Empty ANTHROPIC_API_KEY still falls back to NoopLLMProvider. Documented Claude model is claude-haiku-4-5 (overridable via LLM_MODEL); the OpenAI default gpt-4.1-mini is unchanged.

Open in Web Open in Cursor 

cursoragent and others added 2 commits August 17, 2026 12:46
LLM_PROVIDER=claude drives explain/ask via the Messages API over raw
httpx, matching OpenAI's single-attempt HTTP plus G10 resilience wrap.
An empty ANTHROPIC_API_KEY falls back to noop so the tool still runs
without a key. Closes #35.

Co-authored-by: Leonardo <leo-aa88@users.noreply.github.com>
Drop the unused typer import in status and format the new unit tests
so ruff check on touched files stays clean.

Co-authored-by: Leonardo <leo-aa88@users.noreply.github.com>
@cursor

cursor Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@cursor

cursor Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Review — PR #56 (Claude LLM provider)

Closes #35. Additive provider following the current OpenAI/Ollama + G10 pattern. 848 unit tests passed. Ruff clean on touched files.

Must-fix

(None)

Should-fix

(None)

Nice-to-have

  1. Claude omits temperature: 0 (Anthropic default is 1.0).
  2. raglogs config ANTHROPIC_API_KEY still prints the raw value (pre-existing for any settings field).
  3. Factory always passes settings.llm_model (default gpt-4.1-mini); LLM_PROVIDER=claude without LLM_MODEL can 400 and fall back to templates.
  4. OpenAI and Claude complete() branches in ask are identical.

Verdict

Ready to merge (0 must-fix, 0 should-fix)

@cursor
cursor Bot merged commit c5072fb into main Aug 17, 2026
2 checks passed
@leo-aa88
leo-aa88 deleted the cursor/claude-llm-provider-1cc6 branch August 17, 2026 19: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.

feat: Claude (Anthropic) LLM provider for explain/ask

2 participants