Skip to content

Commit c53bbdb

Browse files
committed
Merge branch 'feature/add-claude4.5-model' into 'develop'
Added Claude sonnet 4.5 and Claude sonnet 4.5 long context See merge request genaiic-reusable-assets/engagement-artifacts/genaiic-idp-accelerator!339
2 parents 111b085 + ec1e89d commit c53bbdb

File tree

13 files changed

+187
-39
lines changed

13 files changed

+187
-39
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ SPDX-License-Identifier: MIT-0
55

66
## [Unreleased]
77

8+
89
## [0.3.19]
910

1011
### Added
@@ -17,6 +18,11 @@ SPDX-License-Identifier: MIT-0
1718
- **Configuration**: Configurable via Web UI including model selection (Claude Sonnet 4 recommended), system prompt customization, max_log_events (default: 5), and time_range_hours_default (default: 24)
1819
- **Documentation**: Comprehensive guide in `docs/error-analyzer.md` with architecture diagrams, usage examples, best practices, troubleshooting guide.
1920

21+
- **Claude Sonnet 4.5 Model Support**
22+
- Added support for Claude Sonnet 4.5 and Claude Sonnet 4.5 - Long Context models
23+
- Available for configuration across all document processing steps
24+
25+
2026
### Fixed
2127
- Problem with setting correctly formatted WAF IPv4 CIDR range - #73
2228

config_library/pattern-1/lending-package-sample/config.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,26 @@ pricing:
362362
price: '6.0E-7'
363363
- name: cacheWriteInputTokens
364364
price: '7.5E-6'
365+
- name: bedrock/us.anthropic.claude-sonnet-4-5-20250929-v1:0
366+
units:
367+
- name: inputTokens
368+
price: '3.3E-6'
369+
- name: outputTokens
370+
price: '1.65E-5'
371+
- name: cacheReadInputTokens
372+
price: '3.3E-7'
373+
- name: cacheWriteInputTokens
374+
price: '4.125E-6'
375+
- name: bedrock/us.anthropic.claude-sonnet-4-5-20250929-v1:0:1m
376+
units:
377+
- name: inputTokens
378+
price: '6.6E-6'
379+
- name: outputTokens
380+
price: '2.475E-5'
381+
- name: cacheReadInputTokens
382+
price: '6.6E-7'
383+
- name: cacheWriteInputTokens
384+
price: '8.25E-6'
365385
- name: bedrock/us.anthropic.claude-opus-4-20250514-v1:0
366386
units:
367387
- name: inputTokens

config_library/pattern-2/bank-statement-sample/config.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -839,6 +839,26 @@ pricing:
839839
price: '6.0E-7'
840840
- name: cacheWriteInputTokens
841841
price: '7.5E-6'
842+
- name: bedrock/us.anthropic.claude-sonnet-4-5-20250929-v1:0
843+
units:
844+
- name: inputTokens
845+
price: '3.3E-6'
846+
- name: outputTokens
847+
price: '1.65E-5'
848+
- name: cacheReadInputTokens
849+
price: '3.3E-7'
850+
- name: cacheWriteInputTokens
851+
price: '4.125E-6'
852+
- name: bedrock/us.anthropic.claude-sonnet-4-5-20250929-v1:0:1m
853+
units:
854+
- name: inputTokens
855+
price: '6.6E-6'
856+
- name: outputTokens
857+
price: '2.475E-5'
858+
- name: cacheReadInputTokens
859+
price: '6.6E-7'
860+
- name: cacheWriteInputTokens
861+
price: '8.25E-6'
842862
- name: bedrock/us.anthropic.claude-opus-4-20250514-v1:0
843863
units:
844864
- name: inputTokens

config_library/pattern-2/lending-package-sample/config.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1603,6 +1603,26 @@ pricing:
16031603
price: '6.0E-7'
16041604
- name: cacheWriteInputTokens
16051605
price: '7.5E-6'
1606+
- name: bedrock/us.anthropic.claude-sonnet-4-5-20250929-v1:0
1607+
units:
1608+
- name: inputTokens
1609+
price: '3.3E-6'
1610+
- name: outputTokens
1611+
price: '1.65E-5'
1612+
- name: cacheReadInputTokens
1613+
price: '3.3E-7'
1614+
- name: cacheWriteInputTokens
1615+
price: '4.125E-6'
1616+
- name: bedrock/us.anthropic.claude-sonnet-4-5-20250929-v1:0:1m
1617+
units:
1618+
- name: inputTokens
1619+
price: '6.6E-6'
1620+
- name: outputTokens
1621+
price: '2.475E-5'
1622+
- name: cacheReadInputTokens
1623+
price: '6.6E-7'
1624+
- name: cacheWriteInputTokens
1625+
price: '8.25E-6'
16061626
- name: bedrock/us.anthropic.claude-opus-4-20250514-v1:0
16071627
units:
16081628
- name: inputTokens

config_library/pattern-2/rvl-cdip-package-sample-with-few-shot-examples/config.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1352,6 +1352,26 @@ pricing:
13521352
price: '6.0E-7'
13531353
- name: cacheWriteInputTokens
13541354
price: '7.5E-6'
1355+
- name: bedrock/us.anthropic.claude-sonnet-4-5-20250929-v1:0
1356+
units:
1357+
- name: inputTokens
1358+
price: '3.3E-6'
1359+
- name: outputTokens
1360+
price: '1.65E-5'
1361+
- name: cacheReadInputTokens
1362+
price: '3.3E-7'
1363+
- name: cacheWriteInputTokens
1364+
price: '4.125E-6'
1365+
- name: bedrock/us.anthropic.claude-sonnet-4-5-20250929-v1:0:1m
1366+
units:
1367+
- name: inputTokens
1368+
price: '6.6E-6'
1369+
- name: outputTokens
1370+
price: '2.475E-5'
1371+
- name: cacheReadInputTokens
1372+
price: '6.6E-7'
1373+
- name: cacheWriteInputTokens
1374+
price: '8.25E-6'
13551375
- name: bedrock/us.anthropic.claude-opus-4-20250514-v1:0
13561376
units:
13571377
- name: inputTokens

config_library/pattern-2/rvl-cdip-package-sample/config.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1077,6 +1077,26 @@ pricing:
10771077
price: '6.0E-7'
10781078
- name: cacheWriteInputTokens
10791079
price: '7.5E-6'
1080+
- name: bedrock/us.anthropic.claude-sonnet-4-5-20250929-v1:0
1081+
units:
1082+
- name: inputTokens
1083+
price: '3.3E-6'
1084+
- name: outputTokens
1085+
price: '1.65E-5'
1086+
- name: cacheReadInputTokens
1087+
price: '3.3E-7'
1088+
- name: cacheWriteInputTokens
1089+
price: '4.125E-6'
1090+
- name: bedrock/us.anthropic.claude-sonnet-4-5-20250929-v1:0:1m
1091+
units:
1092+
- name: inputTokens
1093+
price: '6.6E-6'
1094+
- name: outputTokens
1095+
price: '2.475E-5'
1096+
- name: cacheReadInputTokens
1097+
price: '6.6E-7'
1098+
- name: cacheWriteInputTokens
1099+
price: '8.25E-6'
10801100
- name: bedrock/us.anthropic.claude-opus-4-20250514-v1:0
10811101
units:
10821102
- name: inputTokens

config_library/pattern-3/rvl-cdip-package-sample/config.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -936,6 +936,26 @@ pricing:
936936
price: '6.0E-7'
937937
- name: cacheWriteInputTokens
938938
price: '7.5E-6'
939+
- name: bedrock/us.anthropic.claude-sonnet-4-5-20250929-v1:0
940+
units:
941+
- name: inputTokens
942+
price: '3.3E-6'
943+
- name: outputTokens
944+
price: '1.65E-5'
945+
- name: cacheReadInputTokens
946+
price: '3.3E-7'
947+
- name: cacheWriteInputTokens
948+
price: '4.125E-6'
949+
- name: bedrock/us.anthropic.claude-sonnet-4-5-20250929-v1:0:1m
950+
units:
951+
- name: inputTokens
952+
price: '6.6E-6'
953+
- name: outputTokens
954+
price: '2.475E-5'
955+
- name: cacheReadInputTokens
956+
price: '6.6E-7'
957+
- name: cacheWriteInputTokens
958+
price: '8.25E-6'
939959
- name: bedrock/us.anthropic.claude-opus-4-20250514-v1:0
940960
units:
941961
- name: inputTokens

docs/idp-configuration-best-practices.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1474,6 +1474,9 @@ Configure from these supported models:
14741474
- `us.anthropic.claude-3-5-sonnet-20241022-v2:0`
14751475
- `us.anthropic.claude-3-7-sonnet-20250219-v1:0`
14761476
- `us.anthropic.claude-sonnet-4-20250514-v1:0`
1477+
- `us.anthropic.claude-sonnet-4-20250514-v1:0:1m`
1478+
- `us.anthropic.claude-sonnet-4-5-20250929-v1:0`
1479+
- `us.anthropic.claude-sonnet-4-5-20250929-v1:0:1m`
14771480
- `us.anthropic.claude-opus-4-20250514-v1:0`
14781481
- `us.anthropic.claude-opus-4-1-20250805-v1:0`
14791482

docs/pattern-2.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,9 @@ To use Bedrock OCR:
268268
- `us.anthropic.claude-3-5-sonnet-20241022-v2:0`
269269
- `us.anthropic.claude-3-7-sonnet-20250219-v1:0`
270270
- `us.anthropic.claude-sonnet-4-20250514-v1:0`
271+
- `us.anthropic.claude-sonnet-4-20250514-v1:0:1m`
272+
- `us.anthropic.claude-sonnet-4-5-20250929-v1:0`
273+
- `us.anthropic.claude-sonnet-4-5-20250929-v1:0:1m`
271274
- `us.anthropic.claude-opus-4-20250514-v1:0`
272275
- `us.anthropic.claude-opus-4-1-20250805-v1:0`
273276
3. **Configure prompts**: Customize system and task prompts for your specific use case

lib/idp_common_pkg/idp_common/bedrock/client.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@
4343
"us.anthropic.claude-opus-4-20250514-v1:0",
4444
"us.anthropic.claude-sonnet-4-20250514-v1:0",
4545
"us.anthropic.claude-sonnet-4-20250514-v1:0:1m",
46+
"us.anthropic.claude-sonnet-4-5-20250929-v1:0",
47+
"us.anthropic.claude-sonnet-4-5-20250929-v1:0:1m",
4648
"us.amazon.nova-lite-v1:0",
4749
"us.amazon.nova-pro-v1:0"
4850
]
@@ -269,8 +271,9 @@ def invoke_model(
269271
# Initialize inference config with temperature
270272
inference_config = {"temperature": temperature}
271273

272-
# Handle top_p parameter
273-
if top_p is not None:
274+
# Handle top_p parameter - only use if temperature is 0 or not specified
275+
# Some models don't allow both temperature and top_p to be specified
276+
if top_p is not None and temperature == 0.0:
274277
# Convert top_p to float if it's a string
275278
if isinstance(top_p, str):
276279
try:
@@ -279,7 +282,10 @@ def invoke_model(
279282
logger.warning(f"Failed to convert top_p value '{top_p}' to float. Not using top_p.")
280283
top_p = None
281284

282-
inference_config["topP"] = top_p
285+
if top_p is not None:
286+
inference_config["topP"] = top_p
287+
# Remove temperature when using top_p to avoid conflicts
288+
del inference_config["temperature"]
283289

284290
# Handle max_tokens parameter
285291
if max_tokens is not None:

0 commit comments

Comments
 (0)