feat(provider): add Cohere model provider #500
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.41) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.41 · 210 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.320
Shallow Review Depth
shallow_review_depth
0.289
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #500"
general
weight: 0.35
akshat-lakhera
What changes are being made and why?
Fixes kestra-io/plugin-ai#487: Add Cohere as a model provider
Adds io.kestra.plugin.ai.provider.Cohere, built on OpenAICompliantProvider the same way DeepSeek is. It uses Cohere's OpenAI-compatible API at https://api.cohere.ai/compatibility/v1, so chat completions and embeddings work through the existing path with no new dependency. baseUrl can be overridden if needed.
Also adds Cohere to the plugin docs provider list and to the AGENTS.md class list.
On the questions in the issue: I went with the OpenAI-compatible endpoint, same as DeepSeek, and left reranking out. Tests follow the DeepSeek ones.
---
How the changes have been QAed?
Added testChatCompletionCohere in ChatCompletionTest, gated on COHERE_API_KEY like the DeepSeek test. Locally compileJava, lintPluginDocs and the provider tests pass. I don't have a Cohere key, so the live test was skipped.
Example flow:
id: chat_completion
namespace: company.ai
inputs:
- id: prompt
type: STRING
tasks:
- id: chat_completion
type: io.kestra.plugin.ai.completion.ChatCompletion
provider:
type: io.kestra.plugin.ai.provider.Cohere
apiKey: "{{ secret('COHERE_API_KEY') }}"
modelName: command-a-03-2025
messages:
- type: USER
content: "{{ inputs.prompt }}"
---
Setup Instructions
---
Contributor Checklist ✅