-
Notifications
You must be signed in to change notification settings - Fork 407
docs: add Bitdeer AI provider #2734
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
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
688dbe4
docs: add BitDeer provider
tinatsou 15c2f5c
docs: add BitDeer provider logo
tinatsou eb73887
docs: preserve provider file spacing
tinatsou e6fe63e
docs: add Bitdeer to provider index
tinatsou 8cbc7a1
docs: add Bitdeer provider guide
tinatsou 13df3ad
docs: add Bitdeer configuration template
tinatsou d67d45b
docs: add Bitdeer AI to supported providers
tinatsou b40f67c
Merge branch 'main' into patch-1
nacx d00aae2
docs: use Bitdeer icon and fix provider formatting
tinatsou 1d4dd9f
Merge branch 'main' into patch-1
nacx 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,86 @@ | ||
| # Copyright Envoy AI Gateway Authors | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # The full text of the Apache license is available in the LICENSE file at | ||
| # the root of the repo. | ||
|
|
||
| apiVersion: aigateway.envoyproxy.io/v1beta1 | ||
| kind: AIGatewayRoute | ||
| metadata: | ||
| name: envoy-ai-gateway-basic-bitdeer | ||
| namespace: default | ||
| spec: | ||
| parentRefs: | ||
| - name: envoy-ai-gateway-basic | ||
| kind: Gateway | ||
| group: gateway.networking.k8s.io | ||
| rules: | ||
| - matches: | ||
| - headers: | ||
| - type: Exact | ||
| name: x-ai-eg-model | ||
| value: deepseek-ai/DeepSeek-V4-Pro | ||
| backendRefs: | ||
| - name: envoy-ai-gateway-basic-bitdeer | ||
| --- | ||
| apiVersion: aigateway.envoyproxy.io/v1beta1 | ||
| kind: AIServiceBackend | ||
| metadata: | ||
| name: envoy-ai-gateway-basic-bitdeer | ||
| namespace: default | ||
| spec: | ||
| schema: | ||
| name: OpenAI | ||
| backendRef: | ||
| name: envoy-ai-gateway-basic-bitdeer | ||
| kind: Backend | ||
| group: gateway.envoyproxy.io | ||
| --- | ||
| apiVersion: aigateway.envoyproxy.io/v1beta1 | ||
| kind: BackendSecurityPolicy | ||
| metadata: | ||
| name: envoy-ai-gateway-basic-bitdeer-apikey | ||
| namespace: default | ||
| spec: | ||
| targetRefs: | ||
| - group: aigateway.envoyproxy.io | ||
| kind: AIServiceBackend | ||
| name: envoy-ai-gateway-basic-bitdeer | ||
| type: APIKey | ||
| apiKey: | ||
| secretRef: | ||
| name: envoy-ai-gateway-basic-bitdeer-apikey | ||
| namespace: default | ||
| --- | ||
| apiVersion: gateway.envoyproxy.io/v1alpha1 | ||
| kind: Backend | ||
| metadata: | ||
| name: envoy-ai-gateway-basic-bitdeer | ||
| namespace: default | ||
| spec: | ||
| endpoints: | ||
| - fqdn: | ||
| hostname: api-inference.bitdeer.ai | ||
| port: 443 | ||
| --- | ||
| apiVersion: gateway.networking.k8s.io/v1 | ||
| kind: BackendTLSPolicy | ||
| metadata: | ||
| name: envoy-ai-gateway-basic-bitdeer-tls | ||
| namespace: default | ||
| spec: | ||
| targetRefs: | ||
| - group: "gateway.envoyproxy.io" | ||
| kind: Backend | ||
| name: envoy-ai-gateway-basic-bitdeer | ||
| validation: | ||
| wellKnownCACertificates: "System" | ||
| hostname: api-inference.bitdeer.ai | ||
| --- | ||
| apiVersion: v1 | ||
| kind: Secret | ||
| metadata: | ||
| name: envoy-ai-gateway-basic-bitdeer-apikey | ||
| namespace: default | ||
| type: Opaque | ||
| stringData: | ||
| apiKey: BITDEER_API_KEY # Replace with your Bitdeer AI API key. |
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
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,163 @@ | ||
| --- | ||
| id: bitdeer | ||
| title: Connect Bitdeer AI | ||
| sidebar_position: 7 | ||
| --- | ||
|
|
||
| import CodeBlock from '@theme/CodeBlock'; | ||
| import vars from '../../\_vars.json'; | ||
|
|
||
| # Connect Bitdeer AI | ||
|
|
||
| This guide will help you configure Agent Router to work with Bitdeer AI's serverless models through its OpenAI-compatible API. | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| Before you begin, you'll need: | ||
|
|
||
| - An API key from the [Bitdeer AI Console](https://www.bitdeer.ai/model/apikeys) | ||
| - Basic setup completed from the [Basic Usage](../basic-usage.md) guide | ||
| - Basic configuration removed as described in the [Advanced Configuration](./index.md) overview | ||
|
|
||
| ## Configuration Steps | ||
|
|
||
| :::info | ||
| Ready to proceed? Ensure you have followed the steps in [Connect Providers](./index.md). | ||
| ::: | ||
|
|
||
| ### 1. Download configuration template | ||
|
|
||
| <CodeBlock language="shell">{`curl -O https://raw.githubusercontent.com/theagentrouter/agent-router/${vars.aigwGitRef}/examples/basic/bitdeer.yaml`}</CodeBlock> | ||
|
|
||
| ### 2. Configure Bitdeer AI Credentials | ||
|
|
||
| Edit the `bitdeer.yaml` file to replace the Bitdeer placeholder value: | ||
|
|
||
| - Find the section containing `BITDEER_API_KEY` | ||
| - Replace it with your actual Bitdeer AI API key | ||
|
|
||
| :::caution Security Note | ||
| Make sure to keep your API key secure and never commit it to version control. The key will be stored in a Kubernetes secret. | ||
| ::: | ||
|
|
||
| ### 3. Apply Configuration | ||
|
|
||
| Apply the updated configuration and wait for the Gateway pod to be ready. If you already have a Gateway running, the secret credential update will be picked up automatically in a few seconds. | ||
|
|
||
| ```shell | ||
| kubectl apply -f bitdeer.yaml | ||
| kubectl wait pods --timeout=2m \ | ||
| -l gateway.envoyproxy.io/owning-gateway-name=envoy-ai-gateway-basic \ | ||
| -n envoy-gateway-system \ | ||
| --for=condition=Ready | ||
| ``` | ||
|
|
||
| The template sends requests to Bitdeer AI's OpenAI-compatible endpoint at `https://api-inference.bitdeer.ai/v1`. | ||
|
|
||
| ### 4. Test the Configuration | ||
|
|
||
| You should have set `$GATEWAY_URL` as part of the basic setup before connecting to providers. See the [Basic Usage](../basic-usage.md) page for instructions. | ||
|
|
||
| #### Test Chat Completions | ||
|
|
||
| ```shell | ||
| curl -H "Content-Type: application/json" \ | ||
| -d '{ | ||
| "model": "deepseek-ai/DeepSeek-V4-Pro", | ||
| "messages": [ | ||
| { "role": "user", "content": "Explain serverless inference in one sentence." } | ||
| ] | ||
| }' \ | ||
| $GATEWAY_URL/v1/chat/completions | ||
| ``` | ||
|
|
||
| #### Test Streaming | ||
|
|
||
| ```shell | ||
| curl -N -H "Content-Type: application/json" \ | ||
| -d '{ | ||
| "model": "deepseek-ai/DeepSeek-V4-Pro", | ||
| "messages": [ | ||
| { "role": "user", "content": "Write a short poem about inference." } | ||
| ], | ||
| "stream": true | ||
| }' \ | ||
| $GATEWAY_URL/v1/chat/completions | ||
| ``` | ||
|
|
||
| ## Supported Models | ||
|
|
||
| The template configures `deepseek-ai/DeepSeek-V4-Pro`. Other model IDs include `Qwen/Qwen3.5-397B-A17B` and `moonshotai/Kimi-K2.6`. | ||
|
|
||
| See the [Bitdeer AI Model Catalog](https://developers.bitdeer.ai/docs/api/models-catalog) for the current list and each model's supported capabilities. | ||
|
|
||
| ## Troubleshooting | ||
|
|
||
| If you encounter issues: | ||
|
|
||
| - Verify your API key is correct and active | ||
| - Confirm the requested model ID appears in the Bitdeer AI Model Catalog | ||
| - Check pod status: | ||
|
|
||
| ```shell | ||
| kubectl get pods -n envoy-gateway-system | ||
| ``` | ||
|
|
||
| - View controller logs: | ||
|
|
||
| ```shell | ||
| kubectl logs -n envoy-ai-gateway-system deployment/ai-gateway-controller | ||
| ``` | ||
|
|
||
| - View External Processor logs: | ||
|
|
||
| ```shell | ||
| kubectl logs -n envoy-gateway-system \ | ||
| -l gateway.envoyproxy.io/owning-gateway-name=envoy-ai-gateway-basic \ | ||
| -c ai-gateway-extproc | ||
| ``` | ||
|
|
||
| Common errors: | ||
|
|
||
| - `401`: Invalid API key | ||
| - `429`: Rate limit exceeded | ||
| - `503`: Bitdeer AI service unavailable | ||
|
|
||
| ## Configuring More Models | ||
|
|
||
| To use more models, add more matching rules to the `AIGatewayRoute` in `bitdeer.yaml`. Set each rule's `x-ai-eg-model` header value to a model ID from the [Bitdeer AI Model Catalog](https://developers.bitdeer.ai/docs/api/models-catalog). | ||
|
|
||
| For example, add Qwen and Kimi models alongside the default DeepSeek model: | ||
|
|
||
| ```yaml | ||
| apiVersion: aigateway.envoyproxy.io/v1beta1 | ||
| kind: AIGatewayRoute | ||
| metadata: | ||
| name: envoy-ai-gateway-basic-bitdeer | ||
| namespace: default | ||
| spec: | ||
| parentRefs: | ||
| - name: envoy-ai-gateway-basic | ||
| kind: Gateway | ||
| group: gateway.networking.k8s.io | ||
| rules: | ||
| - matches: | ||
| - headers: | ||
| - type: Exact | ||
| name: x-ai-eg-model | ||
| value: deepseek-ai/DeepSeek-V4-Pro | ||
| - headers: | ||
| - type: Exact | ||
| name: x-ai-eg-model | ||
| value: Qwen/Qwen3.5-397B-A17B | ||
| - headers: | ||
| - type: Exact | ||
| name: x-ai-eg-model | ||
| value: moonshotai/Kimi-K2.6 | ||
| backendRefs: | ||
| - name: envoy-ai-gateway-basic-bitdeer | ||
| ``` | ||
|
|
||
| ## Next Steps | ||
|
|
||
| After configuring Bitdeer AI, return to [Connect Providers](./index.md) to add another provider. |
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
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.
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.
Uh oh!
There was an error while loading. Please reload this page.