Skip to content

docs: add Bifrost integration cookbook - #3752

Open
Swpn0neel wants to merge 2 commits into
langfuse:mainfrom
Swpn0neel:add-bifrost-langfuse-integration
Open

Swpn0neel wants to merge 2 commits into
langfuse:mainfrom
Swpn0neel:add-bifrost-langfuse-integration

Conversation

@Swpn0neel

@Swpn0neel Swpn0neel commented Sep 7, 2026 •

Copy link
Copy Markdown

Summary

  • add a Bifrost integration cookbook notebook
  • configure Bifrost's OpenTelemetry plugin to export GenAI traces to Langfuse
  • demonstrate an OpenAI-compatible request through Bifrost
  • register the notebook route and add the Bifrost icon

Validation

  • validated notebook JSON and required Langfuse metadata and step markers
  • validated cookbook route JSON
  • node scripts/check-h1-headings.js
  • git diff --check

The generated cookbook Markdown was not regenerated, following the repository guidance for integration-page contributions. The notebook keeps the standard placeholder for a trace screenshot and public example trace until a maintainer supplies or approves those assets.


Note

Low Risk
Documentation-only cookbook and route registration with no runtime or security-sensitive application code changes.

Overview
Adds a Bifrost AI gateway integration cookbook and wires it into the docs site at integrations/gateways/bifrost via cookbook/_routes.json.

The new notebook walks through Langfuse + Bifrost end-to-end: env setup and get_client() auth check, generating an OpenTelemetry otel plugin snippet that posts GenAI traces to Langfuse’s public OTEL endpoint (with LANGFUSE_OTEL_AUTH kept out of config), shell/PowerShell/Docker notes for starting Bifrost with that auth, and a sample OpenAI-compatible chat completion routed through the gateway. Step 6 shows a trace screenshot URL and states that a public example trace link is omitted because traces are project-specific.

Reviewed by Cursor Bugbot for commit e138d38. Bugbot is set up for automated code reviews on this repo. Configure here.

Greptile Summary

This PR adds a notebook-backed Bifrost gateway integration, maps it to /integrations/gateways/bifrost, and supplies its integration icon.

  • Configures Bifrost’s OpenTelemetry plugin to export GenAI traces to Langfuse.
  • Demonstrates an OpenAI-compatible request through a locally running Bifrost instance.
  • The route and catalog discovery path are correctly connected, but the reader setup instructions and example-trace link remain incomplete.

Confidence Score: 4/5

The PR appears safe to merge after non-blocking documentation cleanup, particularly completing the Bifrost startup prerequisites and removing the placeholder trace link.

The route and notebook publication flow are sound, but the walkthrough is not runnable from its stated steps without external setup knowledge and exposes an unfinished link to readers.

Files Needing Attention: cookbook/integration_bifrost.ipynb

Prompt To Fix All With AI
### Issue 1
cookbook/integration_bifrost.ipynb:206
**Placeholder trace link**

The published “Example trace in Langfuse” link uses the literal `TODO: replace with...` text as its destination. Notebook conversion preserves this value, while link validation skips destinations that are neither HTTP(S) nor root-relative. Readers will therefore receive an unusable link without CI detecting it. Replace it with an approved public trace URL or remove the link until one is available.

### Issue 2
cookbook/integration_bifrost.ipynb:152
**Missing gateway prerequisites**

The notebook tells readers to start Bifrost but provides no installation or startup command and no provider or virtual-key setup guidance. The next step assumes a gateway running on localhost with a configured model provider and valid virtual key, so readers cannot run the example from the documented steps alone. Add explicit prerequisites and startup/provider-key instructions, or link to the exact Bifrost setup procedure.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (1): Last reviewed commit: "docs: add Bifrost integration cookbook" | Re-trigger Greptile

Greptile also left 1 inline comment on this PR.

Context used:

@vercel

vercel Bot commented Sep 7, 2026

Copy link
Copy Markdown

@Swpn0neel is attempting to deploy a commit to the langfuse Team on Vercel.

A member of the Team first needs to authorize it.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@CLAassistant

CLAassistant commented Sep 7, 2026 •

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Comment thread cookbook/integration_bifrost.ipynb Outdated
"\n",
"![Example Bifrost trace in Langfuse](https://langfuse.com/images/cookbook/integration-bifrost/bifrost-example-trace.png)\n",
"\n",
"[Example trace in Langfuse](TODO: replace with a public Bifrost trace URL from your Langfuse project)\n",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Placeholder trace link

The published “Example trace in Langfuse” link uses the literal TODO: replace with... text as its destination. Notebook conversion preserves this value, while link validation skips destinations that are neither HTTP(S) nor root-relative. Readers will therefore receive an unusable link without CI detecting it. Replace it with an approved public trace URL or remove the link until one is available.

Knowledge Base Used: Cookbook examples

Prompt To Fix With AI
This is a comment left during a code review.
Path: cookbook/integration_bifrost.ipynb
Line: 206

Comment:
**Placeholder trace link**

The published “Example trace in Langfuse” link uses the literal `TODO: replace with...` text as its destination. Notebook conversion preserves this value, while link validation skips destinations that are neither HTTP(S) nor root-relative. Readers will therefore receive an unusable link without CI detecting it. Replace it with an approved public trace URL or remove the link until one is available.

**Knowledge Base Used:** [Cookbook examples](https://app.greptile.com/personal-org-4986/-/custom-context/knowledge-base/langfuse/langfuse-docs/-/docs/cookbook-examples.md)

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

Reviewed by Cursor Bugbot for commit 7b40d89. Configure here.

Comment thread cookbook/integration_bifrost.ipynb

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants