Skip to content

Conversation

@lukekh
Copy link
Contributor

@lukekh lukekh commented Dec 19, 2025

also updated the version for boto3-stubs[bedrock-runtime] so that it included ServiceTierTypeDef

Closes #3761


Note

Adds Bedrock service tier support

  • New BedrockModelSettings.bedrock_service_tier (typed as ServiceTierTypeDef) and propagation to request param serviceTier in bedrock.py
  • Imports ServiceTierTypeDef; request builder now includes serviceTier when provided
  • New test test_bedrock_model_service_tier with VCR cassette
  • Dependency bumps to include required typings: boto3>=1.42.14 for bedrock extra and boto3-stubs[bedrock-runtime]>=1.42.13 in dev/lockfiles

Written by Cursor Bugbot for commit e7ee858. This will update automatically on new commits. Configure here.

lukekh and others added 2 commits December 19, 2025 16:11
also updated the version for boto3-stubs[bedrock-runtime] so that it included ServiceTierTypeDef
@DouweM DouweM changed the title feat: add bedrock_service_tier setting to BedrockModelSettings Add bedrock_service_tier setting to BedrockModelSettings Dec 19, 2025
@DouweM DouweM enabled auto-merge (squash) December 19, 2025 17:18
@DouweM
Copy link
Collaborator

DouweM commented Dec 19, 2025

@lukekh coverage requests that you add a test that uses the new setting :)

involved upgrading boto3 so that serviceTier was recognized at the validation step
auto-merge was automatically disabled December 22, 2025 05:07

Head branch was pushed to by a user without write access

@lukekh
Copy link
Contributor Author

lukekh commented Dec 22, 2025

@lukekh coverage requests that you add a test that uses the new setting :)

Hopefully satisfactory now. I was getting an error until I added boto3 to the dev dependencies... Should I have instead updated the boto3 dependency here?

@DouweM
Copy link
Collaborator

DouweM commented Dec 22, 2025

@lukekh Yes please update it for the optional dependency group; we shouldn't need to list it explicitly under dev

@Kludex Kludex enabled auto-merge (squash) December 23, 2025 11:14
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is being reviewed by Cursor Bugbot

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

interactions:
- request:
body: '{"messages": [{"role": "user", "content": [{"text": "What is the capital of France?"}]}], "system": [{"text": "You
are a helpful chatbot."}], "serviceTier": {"type": "default"}}'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test cassette request mismatches test code service tier value

The test specifies bedrock_service_tier={'type': 'flex'} but the cassette file shows "serviceTier": {"type": "default"} in the recorded request body. This mismatch means the test isn't validating what it claims to test. The cassette appears to have been recorded with a different value than what the test code now uses, making the test unreliable for catching regressions in the bedrock_service_tier functionality.

Additional Locations (1)

Fix in Cursor Fix in Web

@Kludex Kludex merged commit a8254e0 into pydantic:main Dec 23, 2025
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add service_tier to BedrockModelSettings

3 participants