Commit e542ef0
fix: resolve AWS client SigV4 signing, forced SageMaker dep, and missing embed params
- Fix SigV4 host header mismatch: update copied headers dict with correct
host after URL rewrite, so AWSRequest signs with the Bedrock/SageMaker
host instead of stale api.cohere.com
- Add mode parameter to cohere_aws.Client to conditionally initialize
boto3 clients (bedrock-runtime/bedrock vs sagemaker-runtime/sagemaker),
avoiding forced SageMaker dependency for Bedrock users
- Add output_dimension and embedding_types params to embed() for Embed v4
Closes #721
Co-Authored-By: Claude Opus 4.6 <[email protected]>1 parent f366233 commit e542ef0
2 files changed
Lines changed: 16 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
| 242 | + | |
242 | 243 | | |
243 | 244 | | |
244 | 245 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
28 | | - | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
34 | 40 | | |
35 | 41 | | |
36 | 42 | | |
| |||
550 | 556 | | |
551 | 557 | | |
552 | 558 | | |
| 559 | + | |
| 560 | + | |
553 | 561 | | |
554 | 562 | | |
555 | 563 | | |
556 | 564 | | |
557 | | - | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
558 | 568 | | |
559 | 569 | | |
560 | 570 | | |
| |||
0 commit comments