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
86 changes: 86 additions & 0 deletions examples/basic/bitdeer.yaml
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.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Below is a table of currently supported providers and their respective configura
| [Groq](https://console.groq.com/docs/openai) | `{"name":"OpenAI","prefix":"/openai/v1"}` | [API Key] | ✅ | |
| [Grok](https://docs.x.ai/docs/api-reference?utm_source=chatgpt.com#chat-completions) | `{"name":"OpenAI","prefix":"/v1"}` | [API Key] | ✅ | |
| [Together AI](https://docs.together.ai/docs/openai-api-compatibility) | `{"name":"OpenAI","prefix":"/v1"}` | [API Key] | ✅ | |
| [Bitdeer AI](https://developers.bitdeer.ai/docs/api) | `{"name":"OpenAI","prefix":"/v1"}` | [API Key] | ✅ | Only the OpenAI-compatible endpoints |
| [Cohere](https://docs.cohere.com/v2/docs/compatibility-api) | `{"name":"Cohere","version":"v2"}` or `{"name":"OpenAI","prefix":"/compatibility/v1"}` | [API Key] | ✅ | Supports native Cohere v2 (e.g., /cohere/v2/rerank) and OpenAI-compatible endpoints. |
| [TypeSafe AI](https://docs.typesafe.ai/api.md) | `{"name":"TypeSafe","version":"v1"}` | [API Key] | ✅ | Native System One API for the Jev decision model (e.g., /typesafe/v1/systemone). `version` defaults to `v1`. |
| [Mistral](https://docs.mistral.ai/api/#tag/chat/operation/chat_completion_v1_chat_completions_post) | `{"name":"OpenAI","prefix":"/v1"}` | [API Key] | ✅ | |
Expand Down
163 changes: 163 additions & 0 deletions site/docs/getting-started/connect-providers/bitdeer.md
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.
2 changes: 2 additions & 0 deletions site/docs/getting-started/connect-providers/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ After setting up the basic AI Gateway with the mock backend, you can configure i
In this getting started guide you'll find quickstart setups to connect to the following providers:

- [Tetrate Agent Router Service (TARS)](./tars.md) - Connect to Tetrate Agent Router Service's models
- [Bitdeer AI](./bitdeer.md) - Connect to Bitdeer AI's OpenAI-compatible inference models
- [OpenAI](./openai.md) - Connect to OpenAI's GPT models
- [Anthropic](./anthropic.md) - Connect to Anthropic's Claude models
- [AWS Bedrock](./aws-bedrock.md) - Access AWS Bedrock's suite of foundation models
Expand Down Expand Up @@ -42,6 +43,7 @@ When configuring AI providers, keep these security considerations in mind:
Choose your provider to get started:

- [Connect Tetrate Agent Router Service (TARS)](./tars.md)
- [Connect Bitdeer AI](./bitdeer.md)
- [Connect OpenAI](./openai.md)
- [Connect Anthropic](./anthropic.md)
- [Connect AWS Bedrock](./aws-bedrock.md)
Expand Down
1 change: 1 addition & 0 deletions site/src/data/home/providers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export const providers: Provider[] = [
{ name: 'Anthropic', logoUrl: '/img/providers/anthropic.svg', status: 'supported' },
{ name: 'AWS Bedrock', logoUrl: '/img/providers/aws-bedrock.svg', status: 'supported' },
{ name: 'Azure OpenAI', logoUrl: '/img/providers/azure-openai.svg', status: 'supported' },
{ name: 'BitDeer', logoUrl: '/img/providers/bitdeer.svg', status: 'supported' },
{ name: 'Cohere', logoUrl: '/img/providers/cohere.svg', status: 'supported' },
{ name: 'DeepInfra', logoUrl: '/img/providers/deepinfra.svg', status: 'supported' },
{ name: 'DeepSeek', logoUrl: '/img/providers/deepseek.svg', status: 'supported' },
Expand Down
9 changes: 9 additions & 0 deletions site/static/img/providers/bitdeer.svg
Comment thread
tinatsou marked this conversation as resolved.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading