feat(agent): implement Bedrock Converse API, model catalog, and desktop backend - #3704
feat(agent): implement Bedrock Converse API, model catalog, and desktop backend#3704Chukwuebuka-2003 wants to merge 3 commits into
Conversation
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>
657990a to
d833e36
Compare
|
Same note as I left on #3698 — I have a follow-on credential-chain fix + desktop config UI built on top of this branch's Summary of what's queued: |
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 envbedrock_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 pathparse_bedrock_converse()— extracts text, tool calls (toolUse blocks), stopReason mapping (end_turn/tool_use/max_tokens/content_filtered), usage tokenscomplete()andsummarize()match armsbuild_token_source()fixed — Bedrock now returns a no-op token source (SigV4 ≠ bearer auth)Task 4: Bedrock model catalog
catalog_bedrock.rswithdiscover_bedrock_models()— GETsListFoundationModelswith SigV4 signingparse_bedrock_model_list()— filters to ON_DEMAND + TEXT models, builds display names as "ModelName (Provider)"Task 5: Desktop backend (Tauri)
agent_models.rs: Addedis_bedrock_provider()anddiscover_bedrock_models()— readsAWS_REGION/AWS_DEFAULT_REGION, builds Config, callsdiscover_bedrock_models(). Wired into both saved-agent (get_agent_models) and new-agent (discover_agent_models) discovery chainsreadiness.rs: Added Bedrock credential requirements (AWS_ACCESS_KEY_ID,AWS_REGION) and model key (BEDROCK_MODEL)Testing