-
Notifications
You must be signed in to change notification settings - Fork 1
docs: add Eden AI integration guides for Bifrost and Lynkr (AI Gateway) #70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,115 @@ | ||
| --- | ||
| title: "Bifrost" | ||
| icon: "/integration-logo/bifrost-icondoc.svg" | ||
| description: "Use Bifrost with Eden AI to route to 500+ AI models through one OpenAI-compatible gateway." | ||
| --- | ||
|
|
||
| import { TechArticleSchema } from "/snippets/TechArticleSchema.mdx"; | ||
|
|
||
| <TechArticleSchema | ||
| title={"Bifrost"} | ||
| description={"Use Bifrost with Eden AI to route to 500+ AI models through one OpenAI-compatible gateway."} | ||
| path="v3/integrations/bifrost" | ||
| articleSection="AI Gateway" | ||
| about={"LLM Gateway Integration"} | ||
| proficiencyLevel="Intermediate" | ||
| keywords={["Eden AI", "AI API", "Bifrost", "LLM Gateway", "Go"]} | ||
| datePublished="2026-07-16T00:00:00Z" | ||
| dateModified="2026-07-16T00:00:00Z" | ||
| /> | ||
|
|
||
| Use Bifrost with Eden AI to route to 500+ AI models through one OpenAI-compatible gateway. | ||
|
|
||
| ## Overview | ||
|
|
||
| Bifrost is a high-performance open-source LLM gateway (Go) that adds routing, fallbacks, load-balancing and governance across providers. Because Eden AI is fully OpenAI-compatible, you add it through Bifrost's **Custom Provider** configuration β no build and no fork β and route to models from OpenAI, Anthropic, Google, Cohere, Meta and more behind one key, with EU-based, GDPR-aligned inference. | ||
|
|
||
| ## Installation | ||
|
|
||
| <CodeGroup> | ||
| ```bash Docker | ||
| docker run -p 8080:8080 -v $(pwd)/data:/app/data maximhq/bifrost | ||
| ``` | ||
|
|
||
| ```bash npx | ||
| npx -y @maximhq/bifrost | ||
| ``` | ||
| </CodeGroup> | ||
|
|
||
| ## Quick Start | ||
|
|
||
| Add Eden AI as a Custom Provider in your `config.json`, then point any request at it: | ||
|
|
||
| <CodeGroup> | ||
| ```json config.json | ||
| { | ||
| "providers": { | ||
| "edenai": { | ||
| "keys": [ | ||
| { "name": "edenai-key", "value": "env.EDEN_AI_API_KEY", "models": ["*"], "weight": 1.0 } | ||
| ], | ||
| "network_config": { "base_url": "https://api.edenai.run/v3" }, | ||
| "custom_provider_config": { | ||
| "base_provider_type": "openai", | ||
| "allowed_requests": { | ||
| "chat_completion": true, | ||
| "chat_completion_stream": true, | ||
| "embedding": true | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| ```bash curl | ||
| curl -X POST http://localhost:8080/v1/chat/completions \ | ||
| -H "Content-Type: application/json" \ | ||
| -d '{ | ||
| "model": "edenai/openai/gpt-4o", | ||
| "messages": [{"role": "user", "content": "Hello! How are you?"}] | ||
| }' | ||
| ``` | ||
| </CodeGroup> | ||
|
|
||
| You can also add the provider at runtime via `POST /api/providers` or from the Bifrost web UI under **Model Providers** β no restart needed. | ||
|
|
||
| ## Available Models | ||
|
|
||
| Call any Eden AI model through Bifrost as `edenai/<provider>/<model>`: | ||
|
|
||
| **OpenAI** | ||
| - `edenai/openai/gpt-4o` | ||
| - `edenai/openai/gpt-4o-mini` | ||
|
|
||
| **Anthropic** | ||
| - `edenai/anthropic/claude-sonnet-4-5` | ||
| - `edenai/anthropic/claude-haiku-4-5` | ||
|
|
||
| **Google** | ||
| - `edenai/google/gemini-2.5-pro` | ||
| - `edenai/google/gemini-2.5-flash` | ||
|
|
||
| **Mistral** | ||
| - `edenai/mistral/mistral-large-latest` | ||
| - `edenai/mistral/mistral-small-latest` | ||
|
|
||
| ## Routing & Fallbacks | ||
|
|
||
| Because Eden AI is a standard Bifrost provider, it participates in Bifrost's reliability features β weighted keys, load-balancing and provider fallbacks. Add Eden AI alongside other providers and let Bifrost route or fall back to it as needed, all through the same OpenAI-compatible endpoint. | ||
|
|
||
| ## Environment Variables | ||
|
|
||
| Bifrost reads the key referenced as `env.EDEN_AI_API_KEY` in `config.json` from the environment: | ||
|
|
||
| <CodeGroup> | ||
| ```bash .env | ||
| EDEN_AI_API_KEY=your_api_key_here | ||
| ``` | ||
| </CodeGroup> | ||
|
|
||
| ## Next Steps | ||
|
|
||
| - [Chat Completions](/v3/llms/chat-completions) - Core LLM endpoint | ||
| - [List LLM Models](/v3/llms/listing-models) - Browse available providers and models | ||
| - [OpenAI SDK (Python)](/v3/integrations/openai-sdk-python) - Direct SDK usage | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,134 @@ | ||
| --- | ||
| title: "Lynkr" | ||
| icon: "/integration-logo/lynkr-icondoc.svg" | ||
| description: "Use Lynkr with Eden AI to route your gateway to 500+ AI models with tier-based cost optimisation." | ||
| --- | ||
|
|
||
| import { TechArticleSchema } from "/snippets/TechArticleSchema.mdx"; | ||
|
|
||
| <TechArticleSchema | ||
| title={"Lynkr"} | ||
| description={"Use Lynkr with Eden AI to route your gateway to 500+ AI models with tier-based cost optimisation."} | ||
| path="v3/integrations/lynkr" | ||
| articleSection="AI Gateway" | ||
| about={"LLM Gateway Integration"} | ||
| proficiencyLevel="Intermediate" | ||
| keywords={["Eden AI", "AI API", "Lynkr", "LLM Gateway", "Routing"]} | ||
| datePublished="2026-07-16T00:00:00Z" | ||
| dateModified="2026-07-16T00:00:00Z" | ||
| /> | ||
|
|
||
| Use Lynkr with Eden AI to route your gateway to 500+ AI models with tier-based cost optimisation. | ||
|
|
||
| ## Overview | ||
|
|
||
| Lynkr is an open-source LLM gateway that cuts costs with **tier-based routing** β it scores each request 0β100 and sends it to the cheapest model that can handle it. Eden AI is a built-in Lynkr provider, so you reach models from OpenAI, Anthropic, Google, Mistral and 500+ more behind one key, with EU-based, GDPR-aligned inference and unified billing. | ||
|
|
||
| ## Installation | ||
|
|
||
| <CodeGroup> | ||
| ```bash npm | ||
| npm install -g lynkr | ||
| ``` | ||
|
|
||
| ```bash Homebrew | ||
| brew tap fast-editor/lynkr | ||
| brew install lynkr | ||
| ``` | ||
|
|
||
| ```bash Install script | ||
| curl -fsSL https://raw.githubusercontent.com/Fast-Editor/Lynkr/main/install.sh | bash | ||
| ``` | ||
| </CodeGroup> | ||
|
|
||
| ## Quick Start | ||
|
|
||
| Initialise Lynkr, point it at Eden AI, and start the gateway: | ||
|
|
||
| <CodeGroup> | ||
| ```bash Terminal | ||
| lynkr init # scaffold a .env | ||
| export EDENAI_API_KEY=your-edenai-key | ||
| export MODEL_PROVIDER=edenai # send all requests to Eden AI | ||
| lynkr start # OpenAI-compatible endpoint on port 8081 | ||
| ``` | ||
| </CodeGroup> | ||
|
|
||
| ```bash curl | ||
| curl -X POST http://localhost:8081/v1/chat/completions \ | ||
| -H "Content-Type: application/json" \ | ||
| -d '{ | ||
| "model": "mistral/mistral-small-latest", | ||
| "messages": [{"role": "user", "content": "Hello from Lynkr + Eden AI"}] | ||
| }' | ||
| ``` | ||
|
|
||
| ## Configuration | ||
|
|
||
| Lynkr reads provider credentials from environment variables (or a `.env` file): | ||
|
|
||
| <CodeGroup> | ||
| ```bash .env | ||
| EDENAI_API_KEY=your-edenai-key | ||
| EDENAI_MODEL=openai/gpt-4o-mini # default model (provider/model naming) | ||
| EDENAI_EMBEDDINGS_MODEL=openai/text-embedding-ada-002 | ||
| EDENAI_ENDPOINT=https://api.edenai.run/v3/chat/completions | ||
| ``` | ||
| </CodeGroup> | ||
|
|
||
| ### Routing modes | ||
|
|
||
| **Static** β every request goes to Eden AI: | ||
|
|
||
| <CodeGroup> | ||
| ```bash Static | ||
| export MODEL_PROVIDER=edenai | ||
| ``` | ||
| </CodeGroup> | ||
|
|
||
| **Tier-based (recommended for cost)** β set all four tiers to Eden AI models; Lynkr routes by request complexity: | ||
|
|
||
| <CodeGroup> | ||
| ```bash Tier-based | ||
| export TIER_SIMPLE=edenai:mistral/mistral-small-latest | ||
| export TIER_MEDIUM=edenai:openai/gpt-4o-mini | ||
| export TIER_HARD=edenai:anthropic/claude-sonnet-4-5 | ||
| export TIER_EXPERT=edenai:openai/gpt-4o | ||
| ``` | ||
| </CodeGroup> | ||
|
|
||
| ## Available Models | ||
|
|
||
| Use the `provider/model` format for any Eden AI model: | ||
|
|
||
| **OpenAI** | ||
| - `openai/gpt-4o` | ||
| - `openai/gpt-4o-mini` | ||
|
|
||
| **Anthropic** | ||
| - `anthropic/claude-sonnet-4-5` | ||
| - `anthropic/claude-haiku-4-5` | ||
|
|
||
| **Google** | ||
| - `google/gemini-2.5-pro` | ||
| - `google/gemini-2.5-flash` | ||
|
|
||
| **Mistral** | ||
| - `mistral/mistral-large-latest` | ||
| - `mistral/mistral-small-latest` | ||
|
|
||
| ## Environment Variables | ||
|
|
||
| <CodeGroup> | ||
| ```bash .env | ||
| EDENAI_API_KEY=your_api_key_here | ||
| EDENAI_MODEL=openai/gpt-4o-mini | ||
| EDENAI_ENDPOINT=https://api.edenai.run/v3/chat/completions | ||
| ``` | ||
| </CodeGroup> | ||
|
|
||
| ## Next Steps | ||
|
|
||
| - [Chat Completions](/v3/llms/chat-completions) - Core LLM endpoint | ||
| - [List LLM Models](/v3/llms/listing-models) - Browse available providers and models | ||
| - [OpenAI SDK (Python)](/v3/integrations/openai-sdk-python) - Direct SDK usage | ||
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π Maintainability & Code Quality | π‘ Minor | β‘ Quick win
π§© Analysis chain
π Web query:
What are the tier-based routing environment variables (e.g., TIER_SIMPLE, TIER_MEDIUM) used in the Lynkr LLM gateway?π‘ Result:
In the Lynkr LLM gateway, tier-based routing is configured using four mandatory environment variables [1][2]. When all four are defined, Lynkr scores incoming requests for complexity (on a scale of 0-100) and routes them to the specific provider and model assigned to that tier [1][3]. The four required tier-based routing environment variables are: - TIER_SIMPLE: Used for simple tasks (complexity score 0-25) [1][4]. - TIER_MEDIUM: Used for medium-complexity tasks (complexity score 26-50) [1][4]. - TIER_COMPLEX: Used for complex tasks (complexity score 51-75) [1][4]. - TIER_REASONING: Used for highly complex or reasoning-intensive tasks (complexity score 76-100) [1][4]. These variables must be set in the format
provider:model(e.g.,TIER_SIMPLE=ollama:llama3.2) [1][2]. Important configuration details: - Activation: All four variables must be set simultaneously to enable tiered routing [1][5]. If any variable is missing, tiered routing is disabled, and the system defaults to the provider specified in theMODEL_PROVIDERvariable [3][5]. - Priority: When all four are correctly configured, they override theMODEL_PROVIDERfor routing decisions [2][4]. - Fallback: TheMODEL_PROVIDERvariable must still be set, as it is used for system startup checks and as a default provider in specific edge cases [2][5]. Lynkr supports various providers, including ollama, openai, azure-openai, openrouter, databricks, bedrock, vertex, zai, moonshot, llamacpp, and lmstudio [6][2].Citations:
π Script executed:
Repository: edenai/docs
Length of output: 240
π Web query:
Lynkr routing documentation TIER_SIMPLE TIER_MEDIUM TIER_COMPLEX TIER_REASONING environment variablesπ‘ Result:
In Lynkr, the TIER_SIMPLE, TIER_MEDIUM, TIER_COMPLEX, and TIER_REASONING environment variables are used to enable and configure tier-based routing [1][2][3]. When all four variables are set, Lynkr scores incoming requests for complexity (0β100) and automatically routes them to the provider and model specified for the matching tier [1][2][3]. Key details for these variables include: Configuration Requirements: - Format: You must use the provider:model format (e.g., TIER_SIMPLE=ollama:llama3.2) [1][3][4]. - Activation: All four variables must be defined to activate tier-based routing [2][5][3]. If any variable is missing, tier-based routing is disabled, and Lynkr defaults to using the provider defined in the MODEL_PROVIDER environment variable [2][5][3]. - Precedence: When active, these variables override the standard MODEL_PROVIDER setting for routing decisions [2][5][6]. Tier Complexity Mapping: Requests are scored on a scale of 0β100 and mapped to the tiers as follows [2][6]: - TIER_SIMPLE (0β25) - TIER_MEDIUM (26β50) - TIER_COMPLEX (51β75) - TIER_REASONING (76β100) Additional Considerations: - MODEL_PROVIDER: Even when tier-based routing is active, the MODEL_PROVIDER variable remains required for internal processes, such as startup checks, provider discovery, and as a fallback if a tier variable lacks a provider prefix [5][3]. - Fallback: You can also configure a FALLBACK_PROVIDER to handle cases where a chosen tier provider fails [2][6][7]. - Setup: It is recommended to configure these in your.env file using plain KEY=VALUE syntax without an export prefix [8][4].
Citations:
Use Lynkrβs documented tier names.
TIER_HARDandTIER_EXPERTshould beTIER_COMPLEXandTIER_REASONING; Lynkr expectsTIER_SIMPLE,TIER_MEDIUM,TIER_COMPLEX, andTIER_REASONING.π€ Prompt for AI Agents