Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 10, 2026

  • Analyze existing codebase structure for API endpoints
  • Understand OpenAI chat completions implementation pattern
  • Research Anthropic API format (Messages endpoint)
  • Create Anthropic schema types (request/response)
  • Create Anthropic endpoints (messages endpoint)
  • Create Anthropic routes registration
  • Register Anthropic routes in app.go
  • Add unit tests for Anthropic schema
  • Fix code review comments (error handling for JSON operations)
  • Fix test suite to use existing schema test runner
  • Add e2e tests using anthropic-sdk-go for streaming and non-streaming responses
  • Run code review
  • Run CodeQL security check (no alerts found)
Original prompt

Try to implement #1808. Currently LocalAI does support the openai endpoints. We want to support anthropic ones as well so LocalAI can be used as a drop-in replacement for Anthropic. Specifically we want to support for now only the equivalent of chat completions that we support for OpenAI


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI self-assigned this Jan 10, 2026
@netlify
Copy link

netlify bot commented Jan 10, 2026

Deploy Preview for localai ready!

Name Link
🔨 Latest commit bd6a1d5
🔍 Latest deploy log https://app.netlify.com/projects/localai/deploys/696206f04b97940008a3f3cc
😎 Deploy Preview https://deploy-preview-7948--localai.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI and others added 3 commits January 10, 2026 00:13
Co-authored-by: mudler <2420543+mudler@users.noreply.github.com>
Co-authored-by: mudler <2420543+mudler@users.noreply.github.com>
Co-authored-by: mudler <2420543+mudler@users.noreply.github.com>
Copilot AI changed the title [WIP] Add support for anthropic chat completions in LocalAI Add Anthropic Messages API support Jan 10, 2026
Copilot AI requested a review from mudler January 10, 2026 00:23
@mudler mudler changed the title Add Anthropic Messages API support feat: Add Anthropic Messages API support Jan 10, 2026
@mudler
Copy link
Owner

mudler commented Jan 10, 2026

@copilot add an e2e test using https://github.com/anthropics/anthropic-sdk-go as client library for both streaming and non-streaming responses

…streaming

Co-authored-by: mudler <2420543+mudler@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 10, 2026

@copilot add an e2e test using https://github.com/anthropics/anthropic-sdk-go as client library for both streaming and non-streaming responses

Added e2e tests using anthropic-sdk-go in tests/e2e/e2e_anthropic_test.go covering both non-streaming and streaming responses. The tests verify:

  • Non-streaming: message generation, system prompts, and usage information
  • Streaming: token streaming with content block delta events and system prompts

Commit: d8a7f43

@mudler mudler marked this pull request as ready for review January 10, 2026 07:58
@mudler mudler merged commit 4cbf9ab into master Jan 10, 2026
33 checks passed
@mudler mudler deleted the copilot/add-anthropic-chat-completions branch January 10, 2026 11:33
@mudler
Copy link
Owner

mudler commented Jan 10, 2026

@copilot create a follow-up PR to also add the tool support to the anthropic endpoints like we do with openai

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants