aws-samples / aws-samples/amazon-bedrock-samples

Add Amazon Bedrock Mantle OpenAI Responses API sample

Open
#726 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
1.5k
Forks
734
Avg merge
1d 6h
Merged PRs (30d)
4

Description

## Summary

Add an introductory, end-to-end sample showing how to use the OpenAI Python SDK with the Amazon Bedrock `bedrock-mantle` endpoint and Responses API.

## Motivation

Amazon Bedrock supports OpenAI-compatible Models and Responses APIs through the regional Mantle endpoint. The repository currently documents the native InvokeModel and Converse APIs, but does not include a focused introductory notebook for migrating an OpenAI SDK workflow to the Bedrock endpoint.

## Proposed scope

- Add a self-contained notebook under `introduction-to-bedrock`.
- Add the corresponding website Markdown page required by the contribution guidelines.
- Demonstrate regional endpoint configuration and secure API-key handling.
- Discover and validate available model IDs.
- Cover non-retained requests, stored multi-turn state, response retrieval, streaming, and background processing.
- Include bounded polling, actionable error handling, security guidance, cost awareness, and cleanup.
- Add the sample to the introductory README and website navigation.

## Acceptance criteria

- The notebook and website page contain all required contribution-guide sections.
- The notebook contains no credentials, saved outputs, or execution counts.
- Examples use a documented Responses API-compatible model and explicitly constrain output tokens.
- The documented minimum OpenAI SDK version supports every parameter used by the sample.
- Notebook syntax, documentation rendering, internal navigation, and external links validate locally.

## Operational notes

The sample will not provision infrastructure. Running inference requires a regional Amazon Bedrock API key and can incur model usage charges.

Contributor guide

Open the contributing guide

Research direction

Begin by reviewing the existing notebooks under introduction-to-bedrock, the contribution guidelines, the introductory README, and website navigation. Run the local notebook syntax, documentation rendering, internal navigation, and external-link validations. Done means the notebook and website page meet all acceptance criteria without credentials, saved outputs, or execution counts.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, jupyter-notebook, python
Domain
ai, cloud, documentation
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.