docs: Add TrueFoundry AI Gateway integration guide#9391
Conversation
- Add new documentation for integrating Langflow with TrueFoundry AI Gateway - Include comprehensive setup instructions, configuration examples, and usage guidelines - Add AI Gateway section to sidebar under Develop > Observability - Include supporting images for the integration guide - Document load balancing configuration, authentication setup, and best practices
WalkthroughAdded a new documentation page for integrating Langflow with TrueFoundry’s AI Gateway and updated the docs sidebar to include an “AI Gateway” category linking to this page. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. ✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
Status, Documentation and Community
|
|
There was a problem hiding this comment.
Actionable comments posted: 5
🧹 Nitpick comments (7)
docs/docs/Develop/AI Gateway/truefoundry.mdx (7)
19-31: Use sentence case headers and consistent model examples.Update header casing to sentence case and keep model examples consistent with later YAML (gpt-4o).
-## Why Load Balancing Configuration is Necessary +## Why load balancing configuration is necessary -Langflow works optimally with standard OpenAI model names (like `gpt-4`, `gpt-4o-mini`), but may experience compatibility issues with Truefoundry's fully qualified model names (like `openai-main/gpt-4` or `azure-openai/gpt-4`). +Langflow works optimally with standard OpenAI model names (like `gpt-4o`, `gpt-4o-mini`), but may experience compatibility issues with TrueFoundry’s fully qualified model names (like `openai-main/gpt-4o` or `azure-openai/gpt-4o`). -This approach ensures seamless compatibility while still allowing you to access any model through the Truefoundry Gateway. +This approach ensures seamless compatibility while still allowing you to access any model through the TrueFoundry Gateway.
45-63: Add an admonition to minimize misconfiguration and align naming.
- “loadbalancing” → “load-balancing” in resource name.
- Add a tip reminding readers to map every standard model they’ll use.
-```yaml -name: langflow-loadbalancing-config +```yaml +name: langflow-load-balancing-config type: gateway-load-balancing-config rules: - id: langflow-load-balancing type: weight-based-routing when: models: - gpt-4o load_balance_targets: - target: openai-main/gpt-4o weight: 100
+:::tip
+Create one rule per standard model you plan to use (for example,gpt-4o,gpt-4o-mini) and map each to the corresponding fully qualified TrueFoundry target.
+:::--- `110-125`: **Capitalize Component and Flow names and use bold for UI elements.** Conform to the style guide: capitalize Flow/Component and bold UI element names. ```diff -Create a simple chat flow using the configured Language Model: +Create a simple chat Flow using the configured Language Model: -1. Drag and drop a "Chat Input" component -2. Connect it to your configured "OpenAI" Language Model component -3. Connect the output to a "Chat Output" component -4. Run the flow to test the integration +1. Drag and drop a **Chat Input** Component. +2. Connect it to your configured **OpenAI** Language Model Component. +3. Connect the output to a **Chat Output** Component. +4. Run the Flow to test the integration.
151-156: Add a tip about environment variable precedence and scope.Good to show env vars; add an admonition explaining precedence and scope across Flows.
```bash export OPENAI_API_KEY="your-truefoundry-api-key" export OPENAI_API_BASE="https://{controlPlaneUrl}/api/llm/api/inference/openai"
+:::tip
+Set these variables in the environment where Langflow runs (for example, your shell, container, or server). Values set in a Flow’s inputs will override environment variables for that Flow.
+:::Confirm that OPENAI_API_BASE and OPENAI_API_KEY are the exact names used by the OpenAI Component in your build (see Configuration/environment-variables). --- `158-173`: **Align model names with earlier YAML and fix minor grammar.** Keep `gpt-4o` throughout and add a definite article. ```diff -When you use Langflow with standard model names like `gpt-4`, your requests get load-balanced according to your configuration. In the example configuration above, any request to `gpt-4` will be routed to `openai-main/gpt-4` with 100% of the traffic. +When you use Langflow with standard model names like `gpt-4o`, your requests are load-balanced according to your configuration. In the example above, any request to `gpt-4o` will be routed to `openai-main/gpt-4o` with 100% of the traffic.-With this configuration, approximately 70% of your requests would go to OpenAI's GPT-4 model, and 30% would go to Azure OpenAI GPT-4 model. +With this configuration, approximately 70% of your requests would go to OpenAI’s GPT-4 model, and 30% would go to the Azure OpenAI GPT-4 model.
175-182: Optional style: hyphenate “rate‑limiting” as a compound adjective.Minor wording polish per style guides.
-4. **Rate Limiting**: Prevent API quota exhaustion with intelligent rate limiting +4. **Rate limiting**: Prevent API quota exhaustion with intelligent rate‑limiting
5-107: Add security and configuration admonitions to satisfy docs guidelines.The page currently lacks admonitions. Consider adding:
- A warning near PAT usage (already suggested above).
- A tip near base URL about how to find controlPlaneUrl in the TrueFoundry UI.
- A warning near load balancing that mismatched model names will lead to 404/routing failures.
I can draft the exact copy if you confirm the preferred tone and placement.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these settings in your CodeRabbit configuration.
⛔ Files ignored due to path filters (5)
docs/static/img/create PAT.pngis excluded by!**/*.pngdocs/static/img/langflow-1.pngis excluded by!**/*.pngdocs/static/img/langflow-2.pngis excluded by!**/*.pngdocs/static/img/langflow-3.pngis excluded by!**/*.pngdocs/static/img/unified-code-tfy.pngis excluded by!**/*.png
📒 Files selected for processing (2)
docs/docs/Develop/AI Gateway/truefoundry.mdx(1 hunks)docs/sidebars.js(1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
docs/docs/**/*.{md,mdx}
📄 CodeRabbit Inference Engine (.cursor/rules/docs_development.mdc)
docs/docs/**/*.{md,mdx}: All documentation content must be written in Markdown or MDX files located under docs/docs/, following the prescribed directory structure for guides, reference, how-to, concepts, and API documentation.
All documentation Markdown and MDX files must begin with a frontmatter block including at least title and description fields.
Use admonitions (:::tip, :::warning, :::danger) in Markdown/MDX files to highlight important information, warnings, or critical issues.
All images referenced in documentation must include descriptive alt text for accessibility.
All code examples included in documentation must be tested and verified to work as shown.
Internal links in documentation must be functional and not broken.
Content must follow the style guide: professional but approachable tone, second person voice, present tense, short paragraphs, sentence case headers, inline code with backticks, bold for UI elements, italic for emphasis, and parallel structure in lists.
Use consistent terminology: always capitalize Langflow, Component, Flow, and uppercase API and JSON.
Files:
docs/docs/Develop/AI Gateway/truefoundry.mdx
docs/sidebars.js
📄 CodeRabbit Inference Engine (.cursor/rules/docs_development.mdc)
Sidebar navigation must be updated in docs/sidebars.js to reflect new or reorganized documentation content.
Files:
docs/sidebars.js
🧠 Learnings (1)
📚 Learning: 2025-07-18T18:26:42.027Z
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/docs_development.mdc:0-0
Timestamp: 2025-07-18T18:26:42.027Z
Learning: Applies to docs/sidebars.js : Sidebar navigation must be updated in docs/sidebars.js to reflect new or reorganized documentation content.
Applied to files:
docs/sidebars.js
🪛 LanguageTool
docs/docs/Develop/AI Gateway/truefoundry.mdx
[grammar] ~103-~103: There might be a mistake here.
Context: ...e the following settings are configured: - Model Name: Use the load-balanced mode...
(QB_NEW_EN)
[grammar] ~105-~105: There might be a mistake here.
Context: ... (e.g., gpt-4) - OpenAI API Base: https://{controlPlaneUrl}/api/llm/api/inference/openai - OpenAI API Key: Your TrueFoundry Perso...
(QB_NEW_EN)
[grammar] ~172-~172: There might be a mistake here.
Context: ... OpenAI's GPT-4 model, and 30% would go to Azure OpenAI GPT-4 model. ## Benefits ...
(QB_NEW_EN)
[uncategorized] ~179-~179: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...t API quota exhaustion with intelligent rate limiting 5. Fallback Support: Automatic fail...
(EN_COMPOUND_ADJECTIVE_INTERNAL)
🔇 Additional comments (6)
docs/docs/Develop/AI Gateway/truefoundry.mdx (4)
129-147: Validate programmatic example keys and use consistent model/base placeholders.Ensure tweak keys match the actual Component input names, and keep model/base consistent with earlier examples.
-# Example of using Langflow with TrueFoundry Gateway programmatically +# Example: use Langflow with the TrueFoundry Gateway programmatically ... result = flow.run( input_value="What is the capital of Brazil?", tweaks={ - "OpenAI-model_name": "gpt-4", # This will be load-balanced - "OpenAI-openai_api_base": "https://{controlPlaneUrl}/api/llm/api/inference/openai", - "OpenAI-openai_api_key": "your-truefoundry-api-key" + "OpenAI-model_name": "gpt-4o", # This will be load-balanced + "OpenAI-openai_api_base": "https://{controlPlaneUrl}/api/llm/api/inference/openai", + "OpenAI-openai_api_key": "your-truefoundry-api-key" } )Please run a quick validation locally to ensure the tweak keys map correctly in your build of Langflow.
5-10: Request to add TrueFoundry social link (if intended by PR description).PR summary mentioned referencing TrueFoundry’s X/Twitter. If desired, add a small “Learn more” line with that link.
Do you want a brief “Follow TrueFoundry on X” note at the end? If yes, I’ll propose polished copy.
97-107: Use sentence case header and verify agent config field names match component propsChange the header to sentence case and make sure the TrueFoundry example uses the exact input keys used by the OpenAI/Agent components (there are variants in the codebase).
- Evidence to check / files to align with:
- src/frontend/tests/assets/flow_group_test.json — ChatOpenAIComponent build_config uses: model_name, openai_api_base, openai_api_key
- docs/docs/Integrations/Notion/Meeting_Notes_Agent.json — OpenAIModelComponent inputs: model_name, openai_api_base, api_key
- src/frontend/tests/assets/flow_test_drag_and_drop.json — OpenAIModelComponent inputs include: model_name, openai_api_base, api_key
- Note: the codebase contains both api_key and openai_api_key variants (and openai_api_base → mapped to base_url in builds). Use the exact key that matches the OpenAI component you attach to the Agent (llm handle).
-### 4. Advanced Configuration in Agent Settings +### 4. Advanced configuration in agent settings
1-182: Please validate the local docs build — JSX & image paths in truefoundry.mdxQuick summary: I checked the repo. The images referenced in the MDX exist, but the file uses a custom JSX tag and I couldn't find a Frame component or MDX component mapping in the repo — this may break the docs build. Also the docs folder contains a space (Develop/AI Gateway) which can affect slugs/paths in some setups. Please run a local docs build to confirm.
Points to check
- File with custom tags:
- docs/docs/Develop/AI Gateway/truefoundry.mdx — contains at lines ~38, 69, 81, 88, 114.
- Images referenced (and confirmed present):
- src="/images/create PAT.png" → docs/static/img/create PAT.png
- src="/images/langflow-1.png" → docs/static/img/langflow-1.png
- src="/images/unified-code-tfy.png" → docs/static/img/unified-code-tfy.png
- src="/images/langflow-2.png" → docs/static/img/langflow-2.png
- src="/images/langflow-3.png" → docs/static/img/langflow-3.png
- Missing/uncertain items:
- No Frame component definition/import or MDX Provider mapping found in the repo search — confirm how is provided (global MDX components, theme, or plugin).
- Folder name with space: docs/docs/Develop/AI Gateway — confirm intended slug/URL.
Recommended actions
- Run a local docs build (e.g., Docusaurus) and verify:
- No MDX/JSX errors for
- Images load at the paths used (src="/images/...")
- Generated page slug/URL for the "AI Gateway" doc is correct
- If build errors occur:
- Either add/declare the Frame component (or import it in the MDX), or replace blocks with standard MDX/HTML (figure/img or markdown image syntax).
- Consider normalizing the folder name if you want predictable slugs (optional).
docs/sidebars.js (2)
148-154: Sidebar entry looks good; confirm doc ID with space resolves.The new “AI Gateway” category correctly references the doc. However, the doc path contains a space: "Develop/AI Gateway/truefoundry". Spaces in doc IDs/paths can be brittle in Docusaurus.
Consider renaming the folder to “AI-Gateway” and updating the ID accordingly:
- "Develop/AI Gateway/truefoundry", + "Develop/AI-Gateway/truefoundry",If you keep the space, please run a local build to ensure routing works.
95-170: Placement under Develop category is consistent with current structure.No issues spotted with ordering and category usage. Nice addition.
| --- | ||
| title: "TrueFoundry" | ||
| --- |
There was a problem hiding this comment.
Add required frontmatter description and consider clearer title.
Docs must include at least title and description. Suggest clarifying the title to include “AI Gateway”.
Apply this diff:
---
-title: "TrueFoundry"
+title: "TrueFoundry AI Gateway"
+description: "Integrate Langflow with TrueFoundry’s AI Gateway to route OpenAI‑compatible requests with governance, observability, and routing while keeping Langflow telemetry."
---📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| --- | |
| title: "TrueFoundry" | |
| --- | |
| --- | |
| title: "TrueFoundry AI Gateway" | |
| description: "Integrate Langflow with TrueFoundry’s AI Gateway to route OpenAI‑compatible requests with governance, observability, and routing while keeping Langflow telemetry." | |
| --- |
🤖 Prompt for AI Agents
In docs/docs/Develop/AI Gateway/truefoundry.mdx around lines 1 to 3, the
frontmatter only includes a title and is missing the required description and a
clearer title; add a description field to the YAML frontmatter and update the
title to something clearer like "TrueFoundry — AI Gateway" (or "TrueFoundry AI
Gateway"), e.g. include both title and description keys at the top of the file
so the docs system validates and the page clearly references the AI Gateway.
| This guide provides instructions for integrating Langflow with [Truefoundry AI Gateway](https://www.truefoundry.com/ai-gateway). | ||
|
|
||
| TrueFoundry provides an enterprise-ready [AI Gateway](https://www.truefoundry.com/ai-gateway) and integrates seamlessly with frameworks like langflow, providing enterprise-grade AI features including cost tracking, access controls, rate limits, load balancing and fallback strategies | ||
|
|
||
| TrueFoundry's AI Gateway routes all LLM calls through the Gateway to ensure your AI applications are secure, compliant, and cost-effective. | ||
|
|
There was a problem hiding this comment.
🛠️ Refactor suggestion
Fix product naming, capitalization, and punctuation in introduction.
Ensure consistent branding: “TrueFoundry”, “Langflow”. Add missing period.
-This guide provides instructions for integrating Langflow with [Truefoundry AI Gateway](https://www.truefoundry.com/ai-gateway).
+This guide shows how to integrate Langflow with the [TrueFoundry AI Gateway](https://www.truefoundry.com/ai-gateway).
-TrueFoundry provides an enterprise-ready [AI Gateway](https://www.truefoundry.com/ai-gateway) and integrates seamlessly with frameworks like langflow, providing enterprise-grade AI features including cost tracking, access controls, rate limits, load balancing and fallback strategies
+TrueFoundry provides an enterprise-ready [AI Gateway](https://www.truefoundry.com/ai-gateway) and integrates seamlessly with frameworks like Langflow, providing enterprise-grade AI features, including cost tracking, access controls, rate limits, load balancing, and fallback strategies.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| This guide provides instructions for integrating Langflow with [Truefoundry AI Gateway](https://www.truefoundry.com/ai-gateway). | |
| TrueFoundry provides an enterprise-ready [AI Gateway](https://www.truefoundry.com/ai-gateway) and integrates seamlessly with frameworks like langflow, providing enterprise-grade AI features including cost tracking, access controls, rate limits, load balancing and fallback strategies | |
| TrueFoundry's AI Gateway routes all LLM calls through the Gateway to ensure your AI applications are secure, compliant, and cost-effective. | |
| This guide shows how to integrate Langflow with the [TrueFoundry AI Gateway](https://www.truefoundry.com/ai-gateway). | |
| TrueFoundry provides an enterprise-ready [AI Gateway](https://www.truefoundry.com/ai-gateway) and integrates seamlessly with frameworks like Langflow, providing enterprise-grade AI features, including cost tracking, access controls, rate limits, load balancing, and fallback strategies. | |
| TrueFoundry's AI Gateway routes all LLM calls through the Gateway to ensure your AI applications are secure, compliant, and cost-effective. |
🤖 Prompt for AI Agents
In docs/docs/Develop/AI Gateway/truefoundry.mdx around lines 5 to 10, fix
product naming, capitalization, and punctuation: change all instances of
“Truefoundry” to “TrueFoundry” and “langflow” to “Langflow”, ensure “TrueFoundry
AI Gateway” and “Langflow” are consistently capitalized, and add the missing
period at the end of the second sentence so each sentence ends with proper
punctuation.
| 1. **TrueFoundry Account**: Create a [Truefoundry account](https://www.truefoundry.com/register) and follow our quick setup guide, see [Gateway Quick Start](https://docs.truefoundry.com/gateway/quick-start) | ||
| 2. **Langflow Installation**: Install Langflow using either the [Python package](https://github.com/langflow-ai/langflow) or [Docker deployment](https://docs.langflow.org/getting-started-installation) | ||
| 3. **Load Balance Configuration**: Setup load balancing configuration for your desired models (see Setup Process section below) | ||
|
|
There was a problem hiding this comment.
💡 Verification agent
🧩 Analysis chain
Use internal doc links and fix grammar (“set up” as a verb).
Replace the external docs.langflow.org link with an internal doc ID and fix “Setup/Load Balance” phrasing.
-1. **TrueFoundry Account**: Create a [Truefoundry account](https://www.truefoundry.com/register) and follow our quick setup guide, see [Gateway Quick Start](https://docs.truefoundry.com/gateway/quick-start)
-2. **Langflow Installation**: Install Langflow using either the [Python package](https://github.com/langflow-ai/langflow) or [Docker deployment](https://docs.langflow.org/getting-started-installation)
-3. **Load Balance Configuration**: Setup load balancing configuration for your desired models (see Setup Process section below)
+1. **TrueFoundry account**: Create a [TrueFoundry account](https://www.truefoundry.com/register) and follow the [Gateway quick start](https://docs.truefoundry.com/gateway/quick-start).
+2. **Langflow installation**: Install Langflow using either the [Python package](https://github.com/langflow-ai/langflow) or the internal guide: [Install Langflow](/docs/Get-Started/get-started-installation).
+3. **Load balancing configuration**: Set up load balancing for your models (see the setup process below).Please confirm the internal path /docs/Get-Started/get-started-installation is correct for this site build. If your site uses different slugs, adjust accordingly.
🏁 Script executed:
#!/bin/bash
set -euo pipefail
FILE="docs/docs/Develop/AI Gateway/truefoundry.mdx"
echo "---- Showing file snippet ----"
if [ -f "$FILE" ]; then
sed -n '1,200p' "$FILE" || true
else
echo "File not found: $FILE"
fi
echo
echo "---- rg: search for exact slug 'get-started-installation' ----"
if command -v rg >/dev/null 2>&1; then
rg -n --hidden -S -i "get-started-installation" || true
else
echo "rg not available; skipping"
fi
echo
echo "---- rg: search for 'get-started' occurrences ----"
if command -v rg >/dev/null 2>&1; then
rg -n --hidden -S -i "get-started" || true
else
echo "rg not available; skipping"
fi
echo
echo "---- rg: search for 'Install Langflow' occurrences ----"
if command -v rg >/dev/null 2>&1; then
rg -n --hidden -S -i "Install Langflow|Installing Langflow|Install Langflow" || true
else
echo "rg not available; skipping"
fi
echo
echo "---- Listing md/mdx files under docs/ ----"
if command -v fd >/dev/null 2>&1; then
fd -I -e md -e mdx docs | sed -n '1,500p' || true
else
echo "fd not available; falling back to find"
find docs -type f \( -iname "*.md" -o -iname "*.mdx" \) | sed -n '1,500p' || true
fiLength of output: 28051
Replace external Install Langflow link with internal slug and fix "set up" grammar
Verified the correct internal slug is /get-started-installation (see docs/docs/Get-Started/get-started-installation.mdx and sidebars.js).
- File to update: docs/docs/Develop/AI Gateway/truefoundry.mdx — Prerequisites list (lines ~15–18)
-1. **TrueFoundry Account**: Create a [Truefoundry account](https://www.truefoundry.com/register) and follow our quick setup guide, see [Gateway Quick Start](https://docs.truefoundry.com/gateway/quick-start)
-2. **Langflow Installation**: Install Langflow using either the [Python package](https://github.com/langflow-ai/langflow) or [Docker deployment](https://docs.langflow.org/getting-started-installation)
-3. **Load Balance Configuration**: Setup load balancing configuration for your desired models (see Setup Process section below)
+1. **TrueFoundry account**: Create a [TrueFoundry account](https://www.truefoundry.com/register) and follow the [Gateway quick start](https://docs.truefoundry.com/gateway/quick-start).
+2. **Langflow installation**: Install Langflow using either the [Python package](https://github.com/langflow-ai/langflow) or the internal guide: [Install Langflow](/get-started-installation).
+3. **Load balancing configuration**: Set up load balancing for your models (see the setup process below).📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| 1. **TrueFoundry Account**: Create a [Truefoundry account](https://www.truefoundry.com/register) and follow our quick setup guide, see [Gateway Quick Start](https://docs.truefoundry.com/gateway/quick-start) | |
| 2. **Langflow Installation**: Install Langflow using either the [Python package](https://github.com/langflow-ai/langflow) or [Docker deployment](https://docs.langflow.org/getting-started-installation) | |
| 3. **Load Balance Configuration**: Setup load balancing configuration for your desired models (see Setup Process section below) | |
| 1. **TrueFoundry account**: Create a [TrueFoundry account](https://www.truefoundry.com/register) and follow the [Gateway quick start](https://docs.truefoundry.com/gateway/quick-start). | |
| 2. **Langflow installation**: Install Langflow using either the [Python package](https://github.com/langflow-ai/langflow) or the internal guide: [Install Langflow](/get-started-installation). | |
| 3. **Load balancing configuration**: Set up load balancing for your models (see the setup process below). |
🤖 Prompt for AI Agents
In docs/docs/Develop/AI Gateway/truefoundry.mdx around lines 15 to 18, replace
the external Langflow installation link with the internal slug
/get-started-installation (use the same anchor text but point to
/get-started-installation) and fix the grammar in the third bullet by changing
"Load Balance Configuration: Setup load balancing configuration..." to "Load
Balancing configuration: Set up load balancing for your desired models..." so
"Load Balancing" and "Set up" use correct phrasing and casing.
| <Frame> | ||
| <img | ||
| src="/images/create PAT.png" | ||
| alt="TrueFoundry dashboard showing Personal Access Token creation interface" | ||
| /> | ||
| </Frame> | ||
|
|
There was a problem hiding this comment.
💡 Verification agent
🧩 Analysis chain
Avoid using an unknown component and remove spaces from image filenames.
Unless is globally provided by the docs theme, this will fail. Also, filenames with spaces are brittle. Prefer Markdown image syntax, and rename assets to kebab-case if possible.
-<Frame>
- <img
- src="/images/create PAT.png"
- alt="TrueFoundry dashboard showing Personal Access Token creation interface"
- />
-</Frame>
+-<Frame>
- <img
- src="/images/langflow-1.png"
- alt="Langflow interface showing Language Model component configuration panel"
- />
-</Frame>
+-<Frame>
- <img
- src="/images/unified-code-tfy.png"
- alt="TrueFoundry playground showing unified code snippet with base URL and model name for Langflow integration"
- />
-</Frame>
+-<Frame>
- <img
- src="/images/langflow-2.png"
- alt="Langflow OpenAI component configuration with TrueFoundry API settings"
- />
-</Frame>
+-<Frame>
- <img
- src="/images/langflow-3.png"
- alt="Langflow canvas showing a basic chat flow with Chat Input, OpenAI model, and Chat Output components connected"
- />
-</Frame>
+Run this to verify assets exist and no spaces remain in filenames:
Also applies to: 69-75, 81-87, 88-94, 114-120
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "Searching for referenced images..."
rg -n $'/images/(create PAT.png|create-pat.png|langflow-1.png|unified-code-tfy.png|langflow-2.png|langflow-3.png)' docs || true
echo "Listing matching files anywhere in repo..."
fd -a -t f -i 'create pat.png' || true
fd -a -t f -i 'create-pat.png' || true
fd -a -t f -i 'langflow-1.png' || true
fd -a -t f -i 'unified-code-tfy.png' || true
fd -a -t f -i 'langflow-2.png' || true
fd -a -t f -i 'langflow-3.png' || trueLength of output: 1176
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "Searching for Frame usages (MDX/JSX) in the repo..."
rg -n "<Frame\b" || true
echo
echo "Searching for 'Frame' symbol (whole word) across the repo..."
rg -n -w "Frame" || true
echo
echo "Searching for imports/exports referencing Frame..."
rg -n "import .*Frame" || true
rg -n "export .*Frame" || true
echo
echo "Listing files with 'frame' in their filename (case-insensitive)..."
fd -a -t f -i 'frame*' || trueLength of output: 315898
Action: Remove unknown wrappers and rename the image with spaces to kebab-case.
Verified: docs/docs/Develop/AI Gateway/truefoundry.mdx uses to wrap images; there is no exported/imported React/MDX component named "Frame" in the repo. The file docs/static/img/create PAT.png exists (contains a space) — rename it.
Files/locations to fix:
- docs/docs/Develop/AI Gateway/truefoundry.mdx — Frame-wrapped images at (approx.) lines:
- 38-44 — src="/images/create PAT.png" (file exists at docs/static/img/create PAT.png)
- 69-75 — src="/images/langflow-1.png"
- 81-87 — src="/images/unified-code-tfy.png"
- 88-94 — src="/images/langflow-2.png"
- 114-120 — src="/images/langflow-3.png"
Suggested replacements (update MDX and rename the file with a space):
-<Frame>
- <img
- src="/images/create PAT.png"
- alt="TrueFoundry dashboard showing Personal Access Token creation interface"
- />
-</Frame>
+-<Frame>
- <img
- src="/images/langflow-1.png"
- alt="Langflow interface showing Language Model component configuration panel"
- />
-</Frame>
+-<Frame>
- <img
- src="/images/unified-code-tfy.png"
- alt="TrueFoundry playground showing unified code snippet with base URL and model name for Langflow integration"
- />
-</Frame>
+-<Frame>
- <img
- src="/images/langflow-2.png"
- alt="Langflow OpenAI component configuration with TrueFoundry API settings"
- />
-</Frame>
+-<Frame>
- <img
- src="/images/langflow-3.png"
- alt="Langflow canvas showing a basic chat flow with Chat Input, OpenAI model, and Chat Output components connected"
- />
-</Frame>
+Also perform this file rename in the repo:
- docs/static/img/create PAT.png → docs/static/img/create-pat.png (update any references)
Reasoning (short): is not defined/imported in the repo (only an SVG id and JSX id named "Frame" were found), so relying on it is brittle; filenames with spaces are fragile — prefer kebab-case and standard Markdown image syntax in MDX or explicitly import a Frame component if intended.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| <Frame> | |
| <img | |
| src="/images/create PAT.png" | |
| alt="TrueFoundry dashboard showing Personal Access Token creation interface" | |
| /> | |
| </Frame> | |
|  |
🤖 Prompt for AI Agents
In docs/docs/Develop/AI Gateway/truefoundry.mdx around lines 38-44 (and also
update occurrences at approx. 69-75, 81-87, 88-94, 114-120), remove the unknown
<Frame>...</Frame> wrappers around the images and replace them with standard
MDX-friendly image references (e.g., plain Markdown  or a
self-closing <img src="/images/..." alt="..."/>), and rename the file
docs/static/img/create PAT.png to docs/static/img/create-pat.png (update the src
in the MDX to /images/create-pat.png and update any other repo references to the
old filename).
| 1. **Model Provider**: Select "OpenAI" from the dropdown | ||
| 2. **Model Name**: Use the standard model name from your load balancing configuration (e.g., `gpt-4o-mini`) | ||
| 3. **OpenAI API Key**: Enter your TrueFoundry Personal Access Token | ||
| 4. **OpenAI API Base**: Set to `https://{controlPlaneUrl}/api/llm/api/inference/openai` | ||
|
|
There was a problem hiding this comment.
🛠️ Refactor suggestion
Capitalize “Component”, unify example model names, and add a security warning about PAT.
- Use “Component” capitalization per style guide.
- Keep
gpt-4oconsistently across examples. - Add a warning admonition for PAT handling.
-1. **Model Provider**: Select "OpenAI" from the dropdown
-2. **Model Name**: Use the standard model name from your load balancing configuration (e.g., `gpt-4o-mini`)
-3. **OpenAI API Key**: Enter your TrueFoundry Personal Access Token
-4. **OpenAI API Base**: Set to `https://{controlPlaneUrl}/api/llm/api/inference/openai`
+1. **Model provider**: Select "OpenAI" from the dropdown.
+2. **Model name**: Use the standard model name from your load balancing configuration (for example, `gpt-4o`).
+3. **OpenAI API key**: Enter your TrueFoundry Personal Access Token (PAT).
+4. **OpenAI API base**: Set to `https://{controlPlaneUrl}/api/llm/api/inference/openai`
+
+:::warning
+Treat your PAT like a secret. Do not hardcode it in shared Flows or commit it to source control. Prefer using environment variables or your secrets manager.
+:::-Replace `{controlPlaneUrl}` with your actual Truefoundry control plane URL.
+Replace `{controlPlaneUrl}` with your actual TrueFoundry control plane URL.Also applies to: 95-97
🤖 Prompt for AI Agents
In docs/docs/Develop/AI Gateway/truefoundry.mdx around lines 76 to 80 (and also
apply same changes to lines 95 to 97), update the text to: 1) change "Component"
capitalization wherever it appears to follow the style guide; 2) standardize
example model names to use "gpt-4o" consistently (replace any instances of
"gpt-4o-mini" or other variants); and 3) add a security warning admonition
immediately after the OpenAI API Key item advising users to treat their
TrueFoundry Personal Access Token (PAT) as secret, avoid checking it into source
control, and rotate/store it securely (e.g., in a secrets manager).
|
I am not sure that this is supported in the codebase as-is. In any case, the PR doesn't follow our style guide. Please look at the other pages in our documentation for examples. You may reopen or create a new PR after editing accordingly. |



This PR adds documentation for integrating TrueFoundry’s AI Gateway with Langflow in a new folder inside Develop named AI Gateway
The integration sends requests through TrueFoundry’s AI Gateway for unified governance, observability, and routing, while Langflow runs on the client side to capture execution traces and telemetry.
Twitter - https://x.com/truefoundry
Summary by CodeRabbit