Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ ANTHROPIC_API_KEY=
GEMINI_API_KEY=
OPENROUTER_API_KEY=
MISTRAL_API_KEY=
COHERE_API_KEY=
1 change: 1 addition & 0 deletions .github/workflows/e2e-canary.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
BRAINTRUST_API_KEY: ${{ secrets.BRAINTRUST_API_KEY }}
BRAINTRUST_E2E_PROJECT_NAME: ${{ vars.BRAINTRUST_E2E_PROJECT_NAME }}
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
COHERE_API_KEY: ${{ secrets.COHERE_API_KEY }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }}
MISTRAL_API_KEY: ${{ secrets.MISTRAL_API_KEY }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/integration-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ jobs:
BRAINTRUST_E2E_PROJECT_NAME: ${{ vars.BRAINTRUST_E2E_PROJECT_NAME }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
COHERE_API_KEY: ${{ secrets.COHERE_API_KEY }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }}
MISTRAL_API_KEY: ${{ secrets.MISTRAL_API_KEY }}
Expand Down Expand Up @@ -105,6 +106,7 @@ jobs:
BRAINTRUST_E2E_PROJECT_NAME: ${{ vars.BRAINTRUST_E2E_PROJECT_NAME }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
COHERE_API_KEY: ${{ secrets.COHERE_API_KEY }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }}
MISTRAL_API_KEY: ${{ secrets.MISTRAL_API_KEY }}
Expand Down
1 change: 1 addition & 0 deletions e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ Non-hermetic scenarios require provider credentials in addition to the mock Brai
- `GEMINI_API_KEY` or `GOOGLE_API_KEY`
- `OPENROUTER_API_KEY`
- `MISTRAL_API_KEY`
- `COHERE_API_KEY`

`claude-agent-sdk-instrumentation` also uses `ANTHROPIC_API_KEY`, because it runs the real Claude Agent SDK against Anthropic in the same style as the existing live Anthropic wrapper coverage.

Expand Down
12 changes: 12 additions & 0 deletions e2e/config/pr-comment-scenarios.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,18 @@
{ "variantKey": "mistral-v2", "label": "latest v2" }
]
},
{
"scenarioDirName": "cohere-instrumentation",
"label": "Cohere Instrumentation",
"metadataScenario": "cohere-instrumentation",
"variants": [
{ "variantKey": "cohere-v7-14-0", "label": "v7.14.0" },
{ "variantKey": "cohere-v7-20-0", "label": "v7.20.0" },
{ "variantKey": "cohere-v7-21-0", "label": "v7.21.0" },
{ "variantKey": "cohere-v7", "label": "latest v7" },
{ "variantKey": "cohere-v8", "label": "latest v8" }
]
},
{
"scenarioDirName": "openrouter-instrumentation",
"label": "OpenRouter Instrumentation",
Expand Down
1 change: 1 addition & 0 deletions e2e/helpers/scenario-installer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const INSTALL_SECRET_ENV_VARS = [
"OPENAI_API_KEY",
"OPENROUTER_API_KEY",
"MISTRAL_API_KEY",
"COHERE_API_KEY",
] as const;

const cleanupDirs = new Set<string>();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
[
{
"has_input": false,
"has_output": false,
"metadata": {
"scenario": "cohere-instrumentation"
},
"metric_keys": [],
"name": "cohere-instrumentation-root",
"root_span_id": "<span:1>",
"span_id": "<span:1>",
"span_parents": [],
"type": "task"
},
{
"has_input": false,
"has_output": false,
"metadata": {
"operation": "chat"
},
"metric_keys": [],
"name": "cohere-chat-operation",
"root_span_id": "<span:1>",
"span_id": "<span:2>",
"span_parents": [
"<span:1>"
],
"type": null
},
{
"has_input": true,
"has_output": true,
"metadata": {
"model": "command-a-03-2025",
"provider": "cohere"
},
"metric_keys": [
"completion_tokens",
"prompt_cached_tokens",
"prompt_tokens",
"time_to_first_token",
"tokens"
],
"name": "cohere.chat",
"root_span_id": "<span:1>",
"span_id": "<span:3>",
"span_parents": [
"<span:2>"
],
"type": "llm"
},
{
"has_input": false,
"has_output": false,
"metadata": {
"operation": "chat-stream"
},
"metric_keys": [],
"name": "cohere-chat-stream-operation",
"root_span_id": "<span:1>",
"span_id": "<span:4>",
"span_parents": [
"<span:1>"
],
"type": null
},
{
"has_input": true,
"has_output": true,
"metadata": {
"model": "command-a-03-2025",
"provider": "cohere"
},
"metric_keys": [
"completion_tokens",
"prompt_cached_tokens",
"prompt_tokens",
"time_to_first_token",
"tokens"
],
"name": "cohere.chatStream",
"root_span_id": "<span:1>",
"span_id": "<span:5>",
"span_parents": [
"<span:4>"
],
"type": "llm"
},
{
"has_input": false,
"has_output": false,
"metadata": {
"operation": "embed"
},
"metric_keys": [],
"name": "cohere-embed-operation",
"root_span_id": "<span:1>",
"span_id": "<span:6>",
"span_parents": [
"<span:1>"
],
"type": null
},
{
"has_input": true,
"has_output": true,
"metadata": {
"inputType": "search_document",
"model": "embed-english-v3.0",
"provider": "cohere"
},
"metric_keys": [
"prompt_tokens"
],
"name": "cohere.embed",
"root_span_id": "<span:1>",
"span_id": "<span:7>",
"span_parents": [
"<span:6>"
],
"type": "llm"
},
{
"has_input": false,
"has_output": false,
"metadata": {
"operation": "rerank"
},
"metric_keys": [],
"name": "cohere-rerank-operation",
"root_span_id": "<span:1>",
"span_id": "<span:8>",
"span_parents": [
"<span:1>"
],
"type": null
},
{
"has_input": true,
"has_output": true,
"metadata": {
"document_count": 3,
"model": "rerank-english-v3.0",
"provider": "cohere",
"topN": 2
},
"metric_keys": [
"search_units"
],
"name": "cohere.rerank",
"root_span_id": "<span:1>",
"span_id": "<span:9>",
"span_parents": [
"<span:8>"
],
"type": "llm"
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
[
{
"has_input": false,
"has_output": false,
"metadata": {
"scenario": "cohere-instrumentation"
},
"metric_keys": [],
"name": "cohere-instrumentation-root",
"root_span_id": "<span:1>",
"span_id": "<span:1>",
"span_parents": [],
"type": "task"
},
{
"has_input": false,
"has_output": false,
"metadata": {
"operation": "chat"
},
"metric_keys": [],
"name": "cohere-chat-operation",
"root_span_id": "<span:1>",
"span_id": "<span:2>",
"span_parents": [
"<span:1>"
],
"type": null
},
{
"has_input": true,
"has_output": true,
"metadata": {
"model": "command-a-03-2025",
"provider": "cohere"
},
"metric_keys": [
"completion_tokens",
"prompt_cached_tokens",
"prompt_tokens",
"time_to_first_token",
"tokens"
],
"name": "cohere.chat",
"root_span_id": "<span:1>",
"span_id": "<span:3>",
"span_parents": [
"<span:2>"
],
"type": "llm"
},
{
"has_input": false,
"has_output": false,
"metadata": {
"operation": "chat-stream"
},
"metric_keys": [],
"name": "cohere-chat-stream-operation",
"root_span_id": "<span:1>",
"span_id": "<span:4>",
"span_parents": [
"<span:1>"
],
"type": null
},
{
"has_input": true,
"has_output": true,
"metadata": {
"model": "command-a-03-2025",
"provider": "cohere"
},
"metric_keys": [
"completion_tokens",
"prompt_cached_tokens",
"prompt_tokens",
"time_to_first_token",
"tokens"
],
"name": "cohere.chatStream",
"root_span_id": "<span:1>",
"span_id": "<span:5>",
"span_parents": [
"<span:4>"
],
"type": "llm"
},
{
"has_input": false,
"has_output": false,
"metadata": {
"operation": "embed"
},
"metric_keys": [],
"name": "cohere-embed-operation",
"root_span_id": "<span:1>",
"span_id": "<span:6>",
"span_parents": [
"<span:1>"
],
"type": null
},
{
"has_input": true,
"has_output": true,
"metadata": {
"inputType": "search_document",
"model": "embed-english-v3.0",
"provider": "cohere"
},
"metric_keys": [
"prompt_tokens"
],
"name": "cohere.embed",
"root_span_id": "<span:1>",
"span_id": "<span:7>",
"span_parents": [
"<span:6>"
],
"type": "llm"
},
{
"has_input": false,
"has_output": false,
"metadata": {
"operation": "rerank"
},
"metric_keys": [],
"name": "cohere-rerank-operation",
"root_span_id": "<span:1>",
"span_id": "<span:8>",
"span_parents": [
"<span:1>"
],
"type": null
},
{
"has_input": true,
"has_output": true,
"metadata": {
"document_count": 3,
"model": "rerank-english-v3.0",
"provider": "cohere",
"topN": 2
},
"metric_keys": [
"search_units"
],
"name": "cohere.rerank",
"root_span_id": "<span:1>",
"span_id": "<span:9>",
"span_parents": [
"<span:8>"
],
"type": "llm"
}
]
Loading
Loading