test: route Bedrock preamble checks through adaptive thinking
Some checks failed
Cost map pins recheck / rerun-cost-map-guard (push) Has been cancelled
LiteLLM Rust DB / db-queries (push) Has been cancelled
LiteLLM Rust / rust-lint (push) Has been cancelled
LiteLLM Rust / rust-test (push) Has been cancelled
LiteLLM Rust / rust-wheel (push) Has been cancelled
Terraform Modules / fmt, validate, test (aws) (push) Has been cancelled
Terraform Modules / fmt, validate, test (gcp) (push) Has been cancelled
Terraform Provider / gofmt, vet, build, test (push) Has been cancelled
Terraform Provider / Provider endpoints vs proxy OpenAPI schema (push) Has been cancelled

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
ryan 2026-11-05 04:54:36 +00:00
parent 8bbf13d592
commit 37a69bddc9
2 changed files with 7 additions and 0 deletions

View file

@ -230,6 +230,7 @@ class TestBedrockNative:
model=model,
messages=[{"role": "user", "content": WAREHOUSE_PROMPT}],
response_format=WAREHOUSE_RESPONSE_FORMAT,
extra_body={"thinking": {"type": "adaptive"}},
max_tokens=1500,
)
.choices[0]

View file

@ -7137,6 +7137,10 @@ def test_bedrock_json_mode_fake_stream_preserves_preamble_in_chunks() -> None:
}
def respond(request: httpx.Request) -> httpx.Response:
request_body: Final = cast(RequestObject, json.loads(request.content))
tool_config: Final = request_body.get("toolConfig")
assert tool_config is not None
assert [tool["toolSpec"]["name"] for tool in tool_config["tools"]] == ["json_tool_call"]
return httpx.Response(200, json=response_json, request=request)
model: Final = "bedrock/us.anthropic.claude-opus-5-5"
@ -7156,6 +7160,8 @@ def test_bedrock_json_mode_fake_stream_preserves_preamble_in_chunks() -> None:
},
},
},
thinking={"type": "adaptive"},
max_tokens=1500,
stream=True,
aws_access_key_id="fake",
aws_secret_access_key="fake",