# 🚀 AWS Launches OpenAI-Compatible API for Bedrock (and I Did Some Tests!)

> 🚀 AWS OpenAI-Compatible API for Bedrock OSS GPT: Real-World Dev Tests & Insights AWS...

- Author: Gabriel Koo (AWS Community Builder)
- Published: 2025-08-07
- Topics: bedrock, aws, openai
- HTML: https://gabrielkoo.com/blog/aws-launches-openai-compatible-api-for-bedrock-and-i-did-some-tests-49cd/
- Original canonical URL: https://dev.to/aws-builders/aws-launches-openai-compatible-api-for-bedrock-and-i-did-some-tests-49cd

## 🚀 AWS OpenAI-Compatible API for Bedrock OSS GPT: Real-World Dev Tests & Insights

AWS just dropped a [bombshell](https://aws.amazon.com/blogs/aws/openai-open-weight-models-now-available-on-aws/) by launching open-weight GPT models (`gpt-oss-120b`, `gpt-oss-20b`) on Amazon Bedrock as serverless, pay-as-you-go option to self hosting — this caught a lot of headlines 👀.

But as someone obsessed with **Developer Experience (DX)**, I was even more stoked that AWS **finally** launched [an official OpenAI-compatible endpoint](https://docs.aws.amazon.com/bedrock/latest/userguide/inference-chat-completions.html):  

`https://bedrock-runtime.us-west-2.amazonaws.com/openai/v1`  

This puts AWS right alongside Gemini/VertexAI and Anthropic as companies providing first-party OpenAI SDK compatibility, and finally brings native OpenAI "plug-and-play" infra to AWS 🤩

Before we dive in, **here’s my previous deep-dive blog for context on using Amazon Bedrock models with OpenAI compatibility (without fixed costs):**
  
👉 <https://dev.to/aws-builders/use-amazon-bedrock-models-via-an-openai-api-compatible-serverless-endpoint-now-without-fixed-cost-5hf5>

---

## 😎 Wait—Does This Make the Bedrock Proxy Gateway Projects Stale?

Nope! While simple OpenAI API calls still runs perfectly with these new official compatibile Amazon Bedrock Runtimeendpoints, **there are critical compatibility gaps** — so custom proxies/gateways like my [bedrock-access-gateway-function-url](https://github.com/gabrielkoo/bedrock-access-gateway-function-url) project and the official [bedrock-access-gateway](https://github.com/aws-samples/bedrock-access-gateway/) project are nowhere near obsolete yet.

---

## By the Way, AWS Credits Does Cover the `gpt-oss` models!

It has been quite a pity that typical AWS Credits do not cover other models like Claude or Mistral. It's great that this time with the official partnership between AWS and OpenAI, the usage for `gpt-oss` models seems covered finally:

![Image description](/assets/img/23f1c54741f8.png)

---

## 🧑‍💻 I Vibe-Coded the Tests with Kiro AI IDE — Here’s What Happened

You can check my **actual repo and test scripts here:**  
📦 <https://github.com/gabrielkoo/test-official-amazon-bedrock-openai-compatible-endpoint>

**AWS Official Docs:** [AWS Bedrock Docs: OpenAI Chat Completions API](https://docs.aws.amazon.com/bedrock/latest/userguide/inference-chat-completions.html)  
*(Note: The docs didn’t mention support is limited to latest OpenAI `gpt-oss` models only, and didn't mention directly support for `tool_call` or `response_format` features/parameters, so do read on for my real-world dev findings!)*

## Summary Table:

As a control test, I also ran the same testing script with my local Ollama `gpt-oss:20b` model:

| Test                                                 | Bedrock OpenAI Endpoint                  | Local Ollama + `gpt-oss`                | Notes                                                                                      |
|------------------------------------------------------|------------------------------------------|---------------------------------------|--------------------------------------------------------------------------------------------|
| Basic Chat Completion + Reasoning                    | ✅ Works: Step-wise reasoning included   | ✅ Works, chain-of-thought            | Bedrock wraps reasoning in `<reasoning>` tags, both are great for math/logic explanations   |
| `reasoning_effort` parameter                         | ✅ Supported, adjusts explanation depth  | ✅ Supported, works                    | Fine-tune output detail—rare outside OpenAI OSS models                                      |
| 🔧 Tool/Function Calling (`tools`/`tool_choice`)     | ❌ Only intent as JSON, *not* native `tool_calls` | ✅ True OpenAI tool_call schema      | Just like the initial state of `o1-mini`: AWS "gets" the tools, but you can’t delegate natively |
| `response_format` (JSON schema)                      | ❌ Not supported, API error              | ✅ Works, emits JSON                   | Bedrock doesn’t do response schema yet                                                     |
| Token param (`max_tokens` vs `max_completion_tokens`) | ❌ Must use `max_completion_tokens`      | ✅ Accepts either                      | Bedrock is stricter, adjust scripts accordingly                                            |
| Non-OSS Model (`Nova`, `Titan`, etc.)                | ✅ "Model not found", as expected         | ✅ Same                                | Endpoint only exposes OSS GPT models (`gpt-oss-*`) for now                                 |

---

## 🌟 Key DX Takeaways

- **API Parity, But Not Quite Full Compatibility:**  
  Any OpenAI SDK code (and most OpenAI agent frameworks) can now point at AWS’s Bedrock Runtime `/openai/v1` endpoint with just env var tweaks — no code rewriting. This UX is 🔥 for engineers and innovation teams!
- **Transparent, Adjustable Reasoning:**  
  Get full chain-of-thought out-of-the-box, plus parametric reasoning level control. Perfect for math, science, coding, and explainability applications!
- **Tool Calling Support—Almost There:**  
  AWS Bedrock OSS GPT models *recognize* function call intent (return JSON), but don’t yet emit proper `tool_calls` blocks in the response. (While the same test case passed for my local Ollama test on the same `gpt-oss` model). This feels just like the early days of the `o1-mini` models, so: expect better in future, but for now, your OpenAI tool-calling apps will need adapters or proxies. 🙂
- **Strict OpenAI Param Parsing:**  
  If your code uses `max_tokens`, it’ll break here — swap to `max_completion_tokens` for as `gpt-oss` is a reasoning model.
- **Model Registry/Open Weight Only:**  
  The official endpoint supports only `gpt-oss` models so far (`gpt-oss-120b`, `gpt-oss-20b`). Other Amazon Bedrock serverless models like `Nova` will get you a fast fail as of now.
- **Still Need Dev Proxy Power:**  
  [bedrock-access-gateway-function-url](https://github.com/gabrielkoo/bedrock-access-gateway-function-url) is *not* obsolete! It remains highly useful for compatibility workarounds or for non-`gpt-oss` models.

As a disclaimer, if we refer to the model documentation of `gpt-oss` on AWS, <https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters-openai.html>, tool calls were not supported directly for `gpt-oss` on Amazon Bedrock hosted version as of now, so it’s totally possible when AWS release more model support for the new OpenAI endpoint, these could no longer become a concern!

---

## 💡 DX Tips for Devs

- **Add backward/forward compatibility adapters** if you’re building serious agentic stacks.
- **Watch the docs** ([Invoke a model with the OpenAI Chat Completions API](https://docs.aws.amazon.com/bedrock/latest/userguide/inference-chat-completions.html)), but always test yourself — AWS hasn't listed all the current limitations yet clearly in the documentation!
- **Port your scripts with care:**  
  - Reasoning, logic, coding, and OpenAI-style chat: 👍  
  - Tool use, output schemas: ⚠️ adapter or proxy needed today!
- **OSS all the things!** Making the full open-weight LLM stack *API-portable* is a big win for multi-cloud, local/cloud hybrid, and plain old sovereignty nerds. It feels like a new era for "bring your own infra, but keep your SDKs."

---

## Closing

Thanks to [Kiro AI IDE](https://kiro.dev/) for the vibe-code collab and to AWS's team on making the OpenAI compatible endpoint finally launched!

AWS’s new official OpenAI compatible endpoint for `gpt-oss` models is a major leap for cloud/dev portability, even if a few “classic” OpenAI features like native function calling aren’t fully there (yet). If you need adapters, or want total control, proxies like mine remain essential. But for standard chat/reasoning patterns, Bedrock is now OpenAI SDK ready — from your own existing code based on OpenAI SDKs.

Happy building! 🚀🤖

P.S. This article was written on 2025-08-06, 1 day after the new endpoint it was launched, so it's totally possible that by the time you read this blog article, AWS could have already rolled out more support for other common OpenAI SDK features!
