You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: blog/2025-04-11-mar-product-updates.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ Wow - another month has gone by, time flies when you're having fun!
25
25
26
26
Let us share some important updates regarding what we achieved at Defang in March:
27
27
28
-
**Managed LLMs:** One of the coolest features we have released in a bit is [support for Managed LLMs (such as AWS Bedrock) through the `x-defang-llm` compose service extension](https://docs.defang.io/docs/concepts/managed-llms/managed-language-models). When coupled with the `defang/openai-access-gateway` service image, Defang offers the easiest way to [migrate your OpenAI-compatible application to cloud-native managed LLMs](https://docs.defang.io/docs/tutorials/deploying-openai-apps-aws-bedrock) without making any changes to your code. Support for GCP and DigitalOcean coming soon.
28
+
**Managed LLMs:** One of the coolest features we have released in a bit is [support for Managed LLMs (such as AWS Bedrock) through the `x-defang-llm` compose service extension](https://docs.defang.io/docs/concepts/managed-llms/managed-language-models). When coupled with the `defang/openai-access-gateway` service image, Defang offers the easiest way to [migrate your OpenAI-compatible application to cloud-native managed LLMs](https://docs.defang.io/docs/tutorials/deploying-openai-apps) without making any changes to your code. Support for GCP and DigitalOcean coming soon.
29
29
30
30
**Defang Pulumi Provider:** Last month, we announced a preview of the [Defang Pulumi Provider](https://github.com/DefangLabs/pulumi-defang), and this month we are excited to announce that V1 is now available in the [Pulumi Registry](https://www.pulumi.com/registry/packages/defang/). As much as we love Docker, we realize there are many real-world apps that have components that (currently) cannot be described completely in a Compose file. With the Defang Pulumi Provider, you can now leverage [the declarative simplicity of Defang with the imperative power of Pulumi](https://docs.defang.io/docs/concepts/pulumi#when-to-use-the-defang-pulumi-provider).
Copy file name to clipboardExpand all lines: docs/concepts/managed-llms/managed-language-models.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,15 @@ sidebar_position: 3000
8
8
9
9
Each cloud provider offers their own managed Large Language Model services. AWS offers Bedrock, GCP offers Vertex AI, and Digital Ocean offers their GenAI platform. Defang makes it easy to leverage these services in your projects.
In order to leverage cloud-native managed language models from your Defang services, all you need to do is add the `x-defang-llm` extension to the service config and Defang will configure the approprate roles and permissions for you.
@@ -31,12 +40,3 @@ Assume you have a web service like the following, which uses the cloud native SD
31
40
## Deploying OpenAI-compatible apps
32
41
33
42
If you already have an OpenAI-compatible application, Defang makes it easy to deploy on your favourite cloud's managed LLM service. See our [OpenAI Access Gateway](/docs/concepts/managed-llms/openai-access-gateway)
Copy file name to clipboardExpand all lines: docs/concepts/managed-llms/openai-access-gateway.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ sidebar_position: 3000
9
9
Defang makes it easy to deploy on your favourite cloud's managed LLM service with our [OpenAI Access Gateway](https://github.com/DefangLabs/openai-access-gateway). This service sits between your application and the cloud service and acts as a compatibility layer.
10
10
It handles incoming OpenAI requests, translates those requests to the appropriate cloud-native API, handles the native response, and re-constructs an OpenAI-compatible response.
11
11
12
-
See [our tutorial](/docs/tutorials/deploying-openai-apps-aws-bedrock-gcp-vertex/) which describes how to configure the OpenAI Access Gateway for your application.
12
+
See [our tutorial](/docs/tutorials/deploying-openai-apps) which describes how to configure the OpenAI Access Gateway for your application
13
13
14
14
## Docker Provider Services
15
15
@@ -35,6 +35,10 @@ Under the hood, when you use the `model` provider, Defang will deploy the **Open
35
35
36
36
The `x-defang-llm` extension is used to configure the appropriate roles and permissions for your service. See the [Managed Language Models](/docs/concepts/managed-llms/managed-language-models/) page for more details.
37
37
38
+
## Model Mapping
39
+
40
+
Defang supports model mapping through the openai-access-gateway on AWS and GCP. This takes a model with a Docker naming convention (e.g. ai/lama3.3) and maps it to the closest matching model name on the target platform. If no such match can be found it can fallback onto a known existing model (e.g. ai/mistral). These environment variables are USE_MODEL_MAPPING (default to true) and FALLBACK_MODEL (no default), respectively.
Choose the correct `MODEL` depending on which cloud provider you are using.
106
+
107
+
:::info
108
+
**Choosing the Right Model**
109
+
110
+
- For **AWS Bedrock**, use a Bedrock model ID (e.g., `anthropic.claude-3-sonnet-20240229-v1:0`) [See available Bedrock models](https://docs.aws.amazon.com/bedrock/latest/userguide/models-supported.html).
111
+
:::
112
+
113
+
Alternatively, Defang supports model mapping through the openai-access-gateway. This takes a model with a Docker naming convention (e.g. ai/lama3.3) and maps it to
114
+
the closest equilavent on the target platform. If no such match can be found a fallback can be defined to use a known existing model (e.g. ai/mistral). These environment
115
+
variables are USE_MODEL_MAPPING (default to true) and FALLBACK_MODEL (no default), respectively.
Copy file name to clipboardExpand all lines: docs/tutorials/deploying-openai-apps-gcp-vertex.mdx
+34-19Lines changed: 34 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,11 @@
1
1
---
2
-
title: Deploy OpenAI Apps to AWS Bedrock or GCP Vertex AI
2
+
title: Deploy OpenAI Apps to GCP Vertex AI
3
3
sidebar_position: 50
4
4
---
5
5
6
-
# Deploy OpenAI Apps to AWS Bedrock or GCP Vertex AI
6
+
# Deploy OpenAI Apps to GCP Vertex AI
7
7
8
-
Let's assume you have an application that uses an OpenAI client library and you want to deploy it to the cloud, either on **AWS Bedrock** or**GCP Vertex AI**.
8
+
Let's assume you have an application that uses an OpenAI client library and you want to deploy it to the cloud using**GCP Vertex AI**.
9
9
10
10
This tutorial shows you how **Defang** makes it easy.
11
11
@@ -28,7 +28,7 @@ services:
28
28
29
29
## Add an LLM Service to Your Compose File
30
30
31
-
You need to add a new service that acts as a proxy between your app and the backend LLM provider (Bedrock or Vertex).
31
+
You need to add a new service that acts as a proxy between your app and the backend LLM provider (Vertex).
Alternatively, Defang supports model mapping through the openai-access-gateway. This takes a model with a Docker naming convention (e.g. ai/lama3.3) and maps it to
124
+
the closest matching one on the target platform. If no such match can be found it can fallback onto a known existing model (e.g. ai/mistral). These environment
125
+
variables are USE_MODEL_MAPPING (default to true) and FALLBACK_MODEL (no default), respectively.
126
+
127
+
128
+
:::info
119
129
# Complete Example Compose File
120
130
121
131
```yaml
@@ -128,7 +138,7 @@ services:
128
138
environment:
129
139
OPENAI_API_KEY:
130
140
OPENAI_BASE_URL: "http://llm/api/v1"
131
-
MODEL: "anthropic.claude-3-sonnet-20240229-v1:0"# or your Vertex AI model path
0 commit comments