r/aws_bedrockagentcore_harness: add LiteLLM model and full skill union#48656
Open
jesseturner21 wants to merge 3 commits into
Open
r/aws_bedrockagentcore_harness: add LiteLLM model and full skill union#48656jesseturner21 wants to merge 3 commits into
jesseturner21 wants to merge 3 commits into
Conversation
Contributor
Community GuidelinesThis comment is added to every new Pull Request to provide quick reference to how the Terraform AWS Provider is maintained. Please review the information below, and thank you for contributing to the community that keeps the provider thriving! 🚀 Voting for Prioritization
Pull Request Authors
|
2cffb83 to
9445e29
Compare
- model.litellm_model_config: new model union variant (api_base, api_key_arn, max_tokens, model_id, temperature, top_p) - skill: rebuilt from path-only into the full SDK union — path, s3, git (with auth), and aws_skills. skill.path widens from Required to Optional (backward-compatible). Acceptance tests for the LiteLLM model and git skill source included. Split out of hashicorp#48556.
… and float precision bugs
- listvalidator.ExactlyOneOf across the four *_model_config blocks
(attached once; the framework tallies every sibling even when the
attached block is null) catches multi-member configs (which previously
silently dropped members and produced a perpetual diff) and empty
model {} (which previously surfaced an internal
"always an error in the provider" message) at plan time.
- stringvalidator.RegexMatches on harness_name enforces the service
pattern ^[a-zA-Z][a-zA-Z0-9_]{0,39}$ offline; names starting with a
digit or containing dashes previously validated cleanly and only
failed at CreateHarness.
- max_tokens is Optional+Computed with UseStateForUnknown. The Update
API retains the existing value on omission ("if not specified, the
existing value is retained"), so state absorbs the retained server
value instead of showing a perpetual "2000 -> null" diff after
removing max_tokens from configuration.
- temperature and top_p on all four model configs are modeled as
Float64 (schema + model struct). AutoFlex's flattenFloat32 routes
float32 -> types.Float64 through decimal.NewFromFloat32 (comment:
"Avoid loss of equivalence"), so imports round-trip cleanly
(temperature = 0.7 stays 0.7, not 0.699999988079071) and no
ImportStateVerifyIgnore workaround is needed.
Add acctests: harness_name regex ExpectError, model-union ExactlyOneOf
ExpectError (multi-member and empty), and a max_tokens set->unset
transition asserting PostApplyPostRefresh ExpectEmptyPlan (no
perpetual diff).
Dropping the duplicated memory commit (hashicorp#48655's 7151e9d) resurfaces the base retrieval_config.relevance_score (Float32), so the float32validator import is still needed. The model-config float-precision (Float64) work stays intact.
918226a to
0f7465b
Compare
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.
Description
Adds two harness model/skill features that exist in the Bedrock AgentCore control plane API but were missing from the Terraform schema.
model.litellm_model_config— new model union variant (model_id,api_base,api_key_arn,max_tokens,temperature,top_p).skill— rebuilt from a path-only block into the full SDK union:path,s3,git(withauth), andaws_skills.This PR is built on top of #48655 (the memory
Unsupported Typefix). GitHub cross-fork PRs cannot target a fork branch as their base, so this PR is opened againstmainand its diff currently also contains the memory-fix commit from #48655. Once #48655 merges, that commit becomes part ofmainand this PR's diff will collapse to only the LiteLLM + skill changes.Reviewers: the only commit unique to this PR is
r/aws_bedrockagentcore_harness: add LiteLLM model and full skill union. The memory commit belongs to #48655.Why the dependency is real: the service provisions a managed memory configuration by default, so a harness can't be created — and these acceptance tests can't pass — without #48655's flatten fix.
Split from #48556
Part of breaking up #48556 (size/XL) into focused PRs.
Honest caveats
skill.pathchanges from Required to Optional (a widening; backward-compatible for existing configurations).additional_params/api_formaton the harness model configs — already covered by open PRs Add additional params to Bedrock AgentCore harness #48498 / 🤖🤖🤖 [codex] Add Bedrock AgentCore harness api_format #48521.Testing
go build,go vet,gofmtclean.Relations
Part of splitting #48556. Closes #48540. Depends on #48655.