feat: improve Anthropic provider with model selection, system prompt, and scope validation#6444
Merged
talboren merged 1 commit intoMay 11, 2026
Conversation
… and scope validation
Contributor
Author
Contributor
|
🔥 Fantastic work @DJBR007! Your very first PR to keep has been merged! 🎉🥳 You've just taken your first step into open-source, and we couldn't be happier to have you onboard. 🙌 For any support, feel free to reach out on the community: https://slack.keephq.dev. Happy coding! 👩💻👨💻 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat: add Anthropic Claude provider
Closes #2759
/claim #2759
Summary
Adds a native Anthropic Claude provider to Keep, enabling workflows to use Claude models for alert enrichment, root cause analysis, runbook generation, and any other LLM-powered step or action.
This was the most-requested AI provider after OpenAI and directly addresses the ask in #2759.
What's included
keep/providers/anthropic_provider/anthropic_provider.py— full provider implementationkeep/providers/anthropic_provider/__init__.py— auto-discovery entry pointtests/providers/test_anthropic_provider.py— 10 unit tests (config, headers, query, overrides, error handling, scope validation)examples/workflows/anthropic_alert_enrichment.yaml— example workflow: Claude RCA on critical alerts → SlackProvider capabilities
_query()text,model,input_tokens,output_tokensvalidate_scopes()step(query) and can be extended foractionExample workflow usage
The step result exposes
results.text,results.input_tokens, andresults.output_tokensfor use in downstream actions.Testing
All 10 tests pass with mocked HTTP — no API key required for the test suite.
Notes
requests(already in Keep's dependency tree) — no new dependenciesopenai_providerfor consistency2023-06-01(Anthropic's stable version)Happy to add a docs MDX page or any other changes the maintainers want. 🙏