You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7288b2d
Browse filesBrowse the repository at this point in the historyBrowse files
feat(bedrock): run Bedrock models with a saved AWS credential (#9932)
* feat(bedrock): sign with a saved AWS credential's session when one is resolved
A resolved saved-credential session on the provider request is used alone,
passes its session token, and never falls back to inline keys or the
deployment's own AWS credentials. Its client cache key names the credential
and session expiry plus a digest of the key material, never a raw secret.
* feat(bedrock): authorize and resolve a saved AWS credential for Bedrock model calls
resolveBedrockCredentialSession runs the shared credential-use authorization,
then loads the credential only within its workspace and only as a live AWS
credential, resolving it to the stored key pair or a fresh STS session and
recording the credential access.
* fix(bedrock): bind native conversation continuation to the saved AWS credential
A saved credential resolves to fresh session keys every run, so the binding
names the credential instead; requests without one hash exactly as before.
* feat(bedrock): sign agent, router, and evaluator Bedrock calls with a saved AWS credential
A block's bedrockCredential is authorized and resolved for the run's acting user
within the workflow's workspace before the provider call; a failure fails the
call instead of falling back. The session stays off fallbacks on another
provider.
* feat(bedrock): accept a saved AWS credential in the LLM chat and guardrails operations
Translate (llm_chat) and the guardrails hallucination check resolve a selected
Bedrock credential for the acting user before the scoring or chat call, the
same way the executor handlers do; a credential that cannot be used fails the
call before any provider work.
* feat(bedrock): offer a saved AWS credential in the shared LLM model credential fields
Agent, router, evaluator, and translate get an AWS Authentication choice for
Bedrock models: access keys (the default, and what every existing block keeps)
or a saved AWS credential picker, following the Vertex credential pattern.
* test(bedrock): keep the LLM operation credential test free of type errors
* fix(bedrock): refuse a block set to a saved AWS credential whose ID resolves blank
A block whose AWS Authentication is a saved credential, but whose credential
field resolves empty at run time (an empty reference), fell through to inline
keys or the deployment's own AWS credentials. The agent, router, evaluator, and
translate blocks now share one selector that refuses that case, and honors an
explicit access-keys mode over a stale credential ID.
* docs(bedrock): document signing Bedrock model calls with a saved AWS credential
* fix(bedrock): build role-session Bedrock clients per request instead of filling the shared client cache
An assumed or keyless role resolves to a fresh STS session on every call,
so a session-keyed cache entry was never read again and pushed other
providers' warm clients out of the shared LRU. Long-lived saved keys stay
cached. The session type now derives from AwsSessionCredentials, and
authorization refusals carry a reason.
* fix(bedrock): decide the AWS auth mode with one rule for fields and signing
A block signs with a saved AWS credential only when bedrockAuthMode is
'credential', the same rule that shows and serializes the picker. The
agent test no longer leaks a persistent mock rejection.
* fix(bedrock): refuse an unauthorized saved AWS credential with 401 like Vertex
* revert(bedrock): drop the unreachable guardrails saved-credential plumbing
The Guardrails block evaluates its provider credential conditions without
values, so its Bedrock fields never render or serialize; the param could
only arrive outside the shared auth-mode rule.
* docs(bedrock): cover inference-profile IAM scope and role session lifetime
* fix(bedrock): offer the saved AWS credential only on blocks that forward it
Guardrails and Pi spread the shared provider credential fields and inputs but
never pass a saved credential to their call, so the AWS Authentication choice
and credential picker are now opt-in. Agent, Router, Evaluator, and Translate
opt in; Guardrails and Pi keep the fields and catalog schema they had before.
* fix(bedrock): address review on saved AWS credential signing
- Translate resolves the saved credential only for a Bedrock model, so a
leftover credential choice no longer blocks a call to another provider.
- A transient STS failure resolving the credential reports 503 instead of
400, using the classification the AWS tool operations already share.
- llm_chat forwards the run's execution ID to the resolver, naming the
role session and the credential-access audit after the run.
- Native conversation binding keys a saved-credential request on the
credential alone, ignoring inline keys left on the block.
- Handler tests share one central mock for the Bedrock credential module;
the block declaration test is replaced by Translate behavior tests.
- The integration suite writes its credential-access audit inside a rollup
scope and asserts it before teardown.
An AWS credential holds one AWS identity for the whole workspace. Every AWS block (S3, DynamoDB, Lambda, SQS, Athena, CloudWatch, and the rest) signs in with a saved credential, so keys live in one place instead of in each block.
9
+
An AWS credential holds one AWS identity for the whole workspace. Every AWS block (S3, DynamoDB, Lambda, SQS, Athena, CloudWatch, and the rest) signs in with a saved credential, so keys live in one place instead of in each block. The Agent, Router, and Evaluator blocks can also run AWS Bedrock models with a saved credential: choose **Saved AWS credential** under **AWS Authentication**.
10
10
11
11
<Callouttype="info">
12
12
Blocks added before saved credentials, which take access keys typed into the block, are marked legacy and keep working exactly as they are. Upgrade one by replacing it with the current block and selecting a credential.
Copy file name to clipboardExpand all lines: apps/docs/content/docs/workflows/blocks/agent.mdx
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,6 +36,8 @@ The model that runs the step. Defaults to `claude-sonnet-5-5`. Type or pick any
36
36
37
37
For a custom cloud deployment, enter its provider prefix and model ID: `azure/my-deployment`, `azure-anthropic/my-deployment`, `bedrock/my-inference-profile`, or `vertex/my-gemini-model`. The prefix selects the provider and shows its credential fields even when the ID is absent from the catalog. Bedrock accepts full inference profile ARNs after `bedrock/`; Vertex uses the Gemini API and accepts Google model resource names. The deployment must support the selected provider's API. Custom IDs have no catalog pricing or token limits.
38
38
39
+
For an AWS Bedrock model, set **AWS Authentication** to **Access keys** to type a key pair into the block, or to **Saved AWS credential** to sign with a workspace [AWS credential](/integrations/aws-credentials) (access keys, an assumed IAM role, or a keyless role). A saved credential is used on its own: if it cannot be used, the run fails rather than signing with other keys. Its identity needs `bedrock:InvokeModel`, plus `bedrock:InvokeModelWithResponseStream` for streamed runs. Sim calls catalog Claude models through a geographic inference profile (`us.`, `eu.`, or `au.`, picked from the block's **AWS Region**), so a policy scoped to specific resources must allow the inference profile and the foundation model in every Region that profile routes to, as AWS's [inference profile prerequisites](https://docs.aws.amazon.com/bedrock/latest/userguide/inference-profiles-prereq.html) describe. An assumed or keyless role's session starts when the block runs and is not renewed during the run, so one run must finish within the credential's session duration. The Router and Evaluator blocks offer the same choice.
40
+
39
41
Ollama Cloud, OpenRouter, Fireworks, Together AI, Baseten, Ollama, vLLM, and LiteLLM load their available models from the configured provider. New models appear through that discovery without a Sim catalog release. You can also enter a namespaced ID directly, such as `ollama-cloud/deepseek-v4.1-flash`, `openrouter/provider/model`, or `ollama/my-local-model`. Provider prefixes are case-insensitive; the model ID after the prefix keeps its original casing.
`Translate the following text into ${targetLanguage||'English'}. Output ONLY the translated text with no additional commentary, explanations, or notes.`
0 commit comments