Skip to content

feat(agent): implement Bedrock Converse API, model catalog, and desktop backend - #3704

Open
Chukwuebuka-2003 wants to merge 3 commits into
block:mainfrom
Chukwuebuka-2003:feat/bedrock-converse-catalog
Open

feat(agent): implement Bedrock Converse API, model catalog, and desktop backend#3704
Chukwuebuka-2003 wants to merge 3 commits into
block:mainfrom
Chukwuebuka-2003:feat/bedrock-converse-catalog

Conversation

@Chukwuebuka-2003

Copy link
Copy Markdown

Summary

Implement the Bedrock Converse API integration, model catalog discovery, and desktop backend registration for the AWS Bedrock provider.

Refs #3614

Changes

Task 3: Bedrock Converse API in llm.rs

  • post_bedrock() — SigV4-signed POST to /model/{id}/converse, loads AWS creds from env
  • bedrock_converse_body() — full Converse API body builder: messages, system prompt, toolConfig with toolSpec (text + image tool results)
  • bedrock_converse_summary_body() — slim body for summarize path
  • parse_bedrock_converse() — extracts text, tool calls (toolUse blocks), stopReason mapping (end_turn/tool_use/max_tokens/content_filtered), usage tokens
  • Wired into both complete() and summarize() match arms
  • build_token_source() fixed — Bedrock now returns a no-op token source (SigV4 ≠ bearer auth)

Task 4: Bedrock model catalog

  • catalog_bedrock.rs with discover_bedrock_models() — GETs ListFoundationModels with SigV4 signing
  • parse_bedrock_model_list() — filters to ON_DEMAND + TEXT models, builds display names as "ModelName (Provider)"
  • 5 unit tests covering basic parsing, filtering, empty responses

Task 5: Desktop backend (Tauri)

  • agent_models.rs: Added is_bedrock_provider() and discover_bedrock_models() — reads AWS_REGION/AWS_DEFAULT_REGION, builds Config, calls discover_bedrock_models(). Wired into both saved-agent (get_agent_models) and new-agent (discover_agent_models) discovery chains
  • readiness.rs: Added Bedrock credential requirements (AWS_ACCESS_KEY_ID, AWS_REGION) and model key (BEDROCK_MODEL)

Testing

cargo check --workspace   # compiles cleanly
cargo test -p buzz-agent   # 389 passed (incl. 11 new Bedrock tests)

Signed-off-by: Chukwuebuka-2003 <ebulamicheal@gmail.com>
- Add sigv4.rs module with sign_request(), load_aws_credentials(), parse_bedrock_region()

- Add http/aws-smithy-runtime-api dependencies

- Add Provider::Bedrock match arms in llm.rs (placeholders returning errors)

- Enable aws-sigv4 http1 feature for apply_to_request_http1x

- All 6 SigV4 unit tests passing

Signed-off-by: Chukwuebuka-2003 <ebulamicheal@gmail.com>
…op backend

- Add post_bedrock() with SigV4-signed requests to the Converse API

- Add bedrock_converse_body() and bedrock_converse_summary_body() builders

- Add parse_bedrock_converse() with tool call and stop reason extraction

- Wire Provider::Bedrock into complete() and summarize() paths

- Create catalog_bedrock.rs with discover_bedrock_models() and 5 unit tests

- Add Bedrock model discovery to desktop (agent_models.rs) for both saved and new agents

- Add Bedrock credential requirements (AWS_ACCESS_KEY_ID, AWS_REGION) to readiness.rs

- Fix build_token_source for Bedrock (SigV4, not bearer auth)

Refs block#3614

Signed-off-by: Chukwuebuka-2003 <ebulamicheal@gmail.com>
@Chukwuebuka-2003
Chukwuebuka-2003 requested a review from a team as a code owner July 30, 2026 07:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant