Skip to content

Conversation

@cabljac
Copy link
Contributor

@cabljac cabljac commented Nov 11, 2025

1P Anthropic Plugin

This PR introduces an official first-party Anthropic plugin for the Genkit framework.

It provides comprehensive support for Anthropic's Claude models with both stable and beta API endpoints.

Notes:

  • Dual API surface: Support for both stable and beta Anthropic APIs via configurable apiVersion parameter. We use an abstraction layer in runner/base.ts and runner/beta.ts, runner/stable.ts, using generics to reduce duplication of code where possible.

Attribution

This plugin builds upon the excellent foundation provided by the community genkitx-anthropic package originally developed by Bloom Labs Inc. Their Apache 2.0 licensed implementation served as the starting point for this official plugin.

TODO: Review and ensure all necessary attribution requirements have been met. So far we have:

  • Proper copyright headers in modified files
  • NOTICE file with appropriate acknowledgments
  • README attribution section

TODO: Clean up commit history, ensure conventional commit titles throughout.

TODO: Finish off manual testing of all features

TODO: Check that (private) injection of __testClient is OK

TODO: figure out CLA/attribution issues

##References:

v2 API migration guide doc:

https://docs.google.com/document/d/1s1YKwhqdrGN44IG7lSAwltxM3Bqh9p6jTcri8SNaBWk/edit?tab=t.0#heading=h.5nmgndd9f76y

Manual Testing

cabljac and others added 30 commits November 11, 2025 17:03
Co-authored-by: Giorgio Garasto <[email protected]>
Co-authored-by: EPMatt <[email protected]>
Co-authored-by: Xavier Portilla Edo <[email protected]>
Co-authored-by: David Alonso <[email protected]>
Co-authored-by: Michael Doyle <[email protected]>
Co-authored-by: Michał Tuszyński <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Andres Säde <[email protected]>
Co-authored-by: Corie Watson <[email protected]>
Co-authored-by: Dan Nelson <[email protected]>
Co-authored-by: David Oort Alonso <[email protected]>
Co-authored-by: Matteo Agnoletto <[email protected]>
Co-authored-by: Michael Doyle <[email protected]>
Co-authored-by: Swen Mun <[email protected]>
Co-authored-by: nalin <[email protected]>
@google-cla
Copy link

google-cla bot commented Nov 11, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@github-actions github-actions bot added docs Improvements or additions to documentation js config labels Nov 11, 2025
@@ -0,0 +1,170 @@
/**
* Original work Copyright 2024 Bloom Labs Inc
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update headers for dual ownership

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

export const anthropic = anthropicPlugin as AnthropicPlugin;
(anthropic as any).model = (
name: string,
config?: any
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: double check types here


/**
* Anthropic AI plugin for Genkit.
* Includes Claude models (3, 3.5, 3.7, and 4 series).
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: update comment? claude models etc

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

Labels

config docs Improvements or additions to documentation js

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants