Skip to content

Add Claude as a new AI provider#7

Open
Copilot wants to merge 4 commits intomainfrom
copilot/add-claude-as-new-ai-provider
Open

Add Claude as a new AI provider#7
Copilot wants to merge 4 commits intomainfrom
copilot/add-claude-as-new-ai-provider

Conversation

Copy link
Copy Markdown

Copilot AI commented Apr 9, 2026

Adds ClaudeProvider backed by github.com/anthropics/anthropic-sdk-go, implementing the existing Provider interface alongside GoogleProvider.

New provider: ClaudeProvider

  • Name()"claude"
  • ChatCompletion() — calls client.Messages.New(); honours Temperature and SystemInstruction
  • SubmitBatchJob() — calls client.Messages.Batches.New(); maps each request to a MessageBatchNewParamsRequest with an index-based custom_id
  • GetBatchJobStatus() — polls Batches.Get() and, once processing_status == ended, streams results via ResultsStreaming() to aggregate token counts and serialise ResultsJSON; mirrors GoogleProvider's partial-success semantics (≥1 succeeded → completed)

Supporting changes

  • ClaudeConfig { APIKey } added to ProvidersConfig in platform config
  • providers.NewClaude(claudeCfg ClaudeConfig) factory added to providers.go
  • config/default.yaml updated with providers.claude.api_key placeholder

Usage

p, err := providers.NewClaude(cfg.Providers.Claude)

Copilot AI linked an issue Apr 9, 2026 that may be closed by this pull request
Copilot AI and others added 3 commits April 9, 2026 17:12
Copilot AI changed the title [WIP] Add Claude as new AI Provider implementation Add Claude as a new AI provider Apr 9, 2026
Copilot AI requested a review from bayu-aditya April 9, 2026 17:19
@bayu-aditya bayu-aditya marked this pull request as ready for review April 12, 2026 00:11
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.

Add Claude as new AI Provider

2 participants