feat: Add region property to ModelConfig#201
Merged
Merged
Conversation
jsonbailey
approved these changes
Jun 5, 2026
jsonbailey
reviewed
Jun 5, 2026
| """ | ||
|
|
||
| def __init__(self, name: str, parameters: Optional[Dict[str, Any]] = None, custom: Optional[Dict[str, Any]] = None): | ||
| def __init__(self, name: str, parameters: Optional[Dict[str, Any]] = None, custom: Optional[Dict[str, Any]] = None, region: Optional[str] = None): |
Contributor
There was a problem hiding this comment.
looks like a lint issue with the length of this line.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
BEGIN_COMMIT_OVERRIDE
feat: Add region property to ModelConfig
END_COMMIT_OVERRIDE
Requirements
Related issues
https://launchdarkly.atlassian.net/jira/software/c/projects/AIC/boards/2045?selectedIssue=AIC-2689
Describe the solution you've provided
Adds the
regionproperty to theModelConfigobjectAdditional context
Some model providers, namely Bedrock, require including a
regionfield on a given call. A call for a sonnet model might look like:global.anthropic.sonnet-4-7orus.anthropic.sonnet-4-7etc.This field was added on the UI for Bedrock models and is optionally includable. Users would be expected to prepend their region to their model names if they're using a provider that requires it.
Note
Low Risk
Backward-compatible optional field on model config parsing with no changes to auth or provider call paths in this diff.
Overview
Adds optional
regiononModelConfigso AI Config flag variations can carry deployment region (e.g. Bedrockusvsglobal) without encoding it only in the model name.LDAIClientnow readsmodel.regionfrom evaluated variations when building completion/agent/judge configs, andto_dict()includesregionfor round-tripping. OmittedregionstaysNone, so existing flags behave unchanged.Reviewed by Cursor Bugbot for commit 219f71b. Bugbot is set up for automated code reviews on this repo. Configure here.