Commit Graph

65 Commits

Author SHA1 Message Date
Vincent Koc
dc7b21bf36 perf(secrets): scope compat migration scans 2026-04-07 09:52:56 +01:00
Vincent Koc
d5ed6d26e9 chore(plugins): bulk add package boundary tsconfig rollout 2026-04-07 08:48:23 +01:00
Peter Steinberger
474db91bed refactor: dedupe extension error formatting 2026-04-07 02:03:34 +01:00
Peter Steinberger
a685a7afc9 refactor: dedupe package record guards 2026-04-07 02:03:33 +01:00
Peter Steinberger
8b79cbcd06 build(plugins): align package versions to 2026.4.6 2026-04-06 17:05:30 +01:00
Peter Steinberger
f2a710ce63 fix(ci): align stale test expectations 2026-04-06 16:53:21 +01:00
Peter Steinberger
af62a2c2e4 style: fix extension lint violations 2026-04-06 14:53:55 +01:00
Peter Steinberger
45875ed532 chore(deps): update dependencies 2026-04-06 13:25:17 +01:00
Peter Steinberger
ce8492f9a0 chore: bump version to 2026.4.5 2026-04-05 21:33:04 +01:00
Peter Steinberger
629baf5fa7 refactor: move plugin setup and memory capabilities to registries 2026-04-05 14:53:53 +01:00
Peter Steinberger
d70162864a chore(deps): update direct dependencies 2026-04-05 13:33:16 +01:00
wirjo
78fe96f2d4 feat(bedrock): add inference profile discovery and region injection (#61299)
* feat(bedrock): add inference profile discovery and region injection

Inference profiles (cross-region and application) work with ConverseStream
but require the SDK client region to match the profile region. Without
this, users get "The provided model identifier is invalid" errors when
using cross-region profiles like us.anthropic.claude-sonnet-4-6.

Changes:

1. Inference profile discovery (discovery.ts):
   - Call ListInferenceProfiles alongside ListFoundationModels (parallel)
   - Inference profiles INHERIT capabilities from their underlying
     foundation model (modalities, reasoning, context window, cost)
   - resolveBaseModelId() maps profile → foundation model:
     "us.anthropic.claude-sonnet-4-6" → "anthropic.claude-sonnet-4-6"
     Application ARNs → extract model ID from models[].modelArn
   - Graceful degradation if IAM lacks bedrock:ListInferenceProfiles
   - Provider filter applies to profiles via underlying model ARNs

2. Region injection (register.sync.runtime.ts):
   - Extract region from provider baseUrl or bedrockDiscovery.region
   - Pass through to pi-ai options.region in wrapStreamFn
   - Ensures SDK client connects to correct regional endpoint

3. Inference profile model detection (anthropic-family-cache-semantics.ts):
   - isAnthropicBedrockModel() now recognizes application inference
     profile ARNs (arn:aws:bedrock:...:application-inference-profile/*)

4. Tests (discovery.test.ts):
   - New: inference profile inheritance test (4 models: 1 foundation +
     3 profiles, verifies capability inheritance, inactive filtering)
   - New: graceful AccessDeniedException handling test
   - Updated: all existing tests for dual-API discovery pattern

Fixes #55642

* fix(bedrock): preserve inference profile model lookup

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-04-05 12:52:03 +01:00
Peter Steinberger
be526d6423 refactor: split provider stream sdk seams 2026-04-05 11:19:05 +01:00
Vincent Koc
ef3a185225 fix(ci): keep bedrock config compat inside the extension 2026-04-05 10:08:47 +01:00
Peter Steinberger
4a85810091 fix: migrate bedrock discovery config in doctor 2026-04-05 09:55:55 +01:00
Peter Steinberger
19de5d1b56 refactor: move provider discovery config into plugins 2026-04-05 09:55:55 +01:00
wirjo
019a25e35c Fix/bedrock aws sdk apikey injection (#61194)
* fix(bedrock): stop injecting fake apiKey marker for aws-sdk auth when no env vars exist

When the Bedrock provider uses auth: "aws-sdk" and no AWS environment
variables are set (EC2 instance roles, ECS task roles, etc.),
resolveAwsSdkApiKeyVarName() fell back to "AWS_PROFILE" unconditionally.
This string was injected as apiKey in the provider config during
normalisation, which poisoned the downstream auth resolver — it treated
the marker as a literal key and failed with "No API key found".

The fix:
- resolveAwsSdkApiKeyVarName() now returns undefined (not "AWS_PROFILE")
  when no AWS env vars are present
- resolveBedrockConfigApiKey() (extension) gets the same fix
- resolveMissingProviderApiKey() guards both the providerApiKeyResolver
  and direct aws-sdk branches: if the resolver returns nothing, the
  provider config is returned unchanged (no apiKey injected)
- The aws-sdk credential chain then resolves credentials at request time
  via IMDS/ECS task role/etc. as intended

When AWS env vars ARE present (AWS_ACCESS_KEY_ID, AWS_PROFILE,
AWS_BEARER_TOKEN_BEDROCK), the marker is still injected correctly.

Closes #49891
Closes #50699
Fixes #54274

* test(bedrock): update resolveBedrockConfigApiKey test for undefined return on empty env

The test previously expected "AWS_PROFILE" when no env vars are set.
Now expects undefined (matching the fix), and adds a separate assertion
that AWS_PROFILE is returned when the env var is actually present.

* fix(bedrock): lock aws-sdk env marker behavior

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-04-05 08:24:05 +01:00
Peter Steinberger
67d6fc8847 chore(plugins): sync versions to 2026.4.4 2026-04-04 20:03:01 +01:00
Peter Steinberger
ca200eb480 fix(providers): stabilize runtime normalization hooks 2026-04-04 19:34:56 +01:00
Peter Steinberger
e3ac0f43df feat(qwen): add qwen provider and video generation 2026-04-04 19:34:56 +01:00
Vincent Koc
fa34f3a9d5 fix(ci): restore provider runtime seams 2026-04-04 23:19:23 +09:00
Peter Steinberger
dd771f1dc6 fix(ci): repair plugin boundary and bootstrap regressions 2026-04-04 15:09:48 +01:00
Peter Steinberger
76d1f26782 chore(deps): update workspace dependencies 2026-04-04 22:40:08 +09:00
Vincent Koc
39d2a719c9 refactor(providers): add family replay and tool hooks 2026-04-04 19:33:31 +09:00
Peter Steinberger
f4855baf35 fix(ci): await async provider test registration 2026-04-04 09:28:43 +01:00
Peter Steinberger
b167ad052c refactor(providers): move defaults and error policy into plugins 2026-04-04 07:43:14 +01:00
Vincent Koc
bcd11176ef refactor(amazon-bedrock): lazy-load provider registration 2026-04-04 15:26:37 +09:00
Vincent Koc
858bf405f4 refactor(providers): share replay and tool compat helpers (#60637)
* refactor(providers): share replay and tool compat helpers

* chore(plugin-sdk): refresh api baseline
2026-04-04 10:55:36 +09:00
Josh Lehman
799c6f40aa refactor: move provider replay runtime ownership into plugins (#60126)
* refactor: move provider replay runtime ownership into plugins

* fix(provider-runtime): address review followups

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-04-03 23:14:37 +09:00
Peter Steinberger
d74a12264a fix: mirror bedrock runtime dep in root package 2026-04-02 19:26:56 +01:00
Peter Steinberger
8988894ff7 build: prepare 2026.4.1-beta.1 release 2026-04-01 15:09:19 +01:00
Josh Lehman
5836ddea3f test: fix amazon-bedrock extension test boundary (#58753)
* Tests: stop amazon-bedrock from importing private core plugin types

* Config: refresh generated doc baseline
2026-03-31 22:24:38 -07:00
Michael Flanagan
eee185af99 feat(amazon-bedrock): add Bedrock Guardrails support (#58588)
* feat(amazon-bedrock): just the kiro plans, need to remove before PR

* docs(bedrock-guardrails): add environment setup instructions

* docs(bedrock-guardrails): mark environment setup tasks as completed

* feat(amazon-bedrock): add trace configuration to guardrail settings

* feat(amazon-bedrock): implement guardrail wrapper factory and wire into registration

* test(amazon-bedrock): add comprehensive guardrail configuration tests

* docs(bedrock): add guardrails configuration documentation

* docs(bedrock-guardrails): add comprehensive manual testing guide for Docker deployment

* docs(bedrock-guardrails): expand manual testing guide with STS credentials and config options

* docs(bedrock-guardrails): complete manual testing verification with 8 test scenarios

* chore: remove kiro spec files from PR

* fix(docs): correct guardrail config path to plugins.entries.*.config

* style: format docs and test files
2026-03-31 21:09:52 -04:00
Peter Steinberger
63819bb383 test: consolidate provider and web-search contracts 2026-04-01 01:44:43 +01:00
Josh Lehman
adc329b26b test: dedupe extension-owned coverage (#58554)
* test: dedupe extension-owned coverage

* test: remove duplicate coverage files

* test: move helper coverage into extensions

* test: trim duplicate helper assertions

* test: remove cloudflare helper import from agent test

* test: align stale expectations with current main
2026-03-31 15:18:29 -07:00
Peter Steinberger
9ea7e06460 build: bump version to 2026.4.1 2026-03-31 22:53:17 +01:00
Peter Steinberger
2a60e34f2a build: prepare 2026.3.31 stable release 2026-03-31 21:32:38 +01:00
Vincent Koc
2e530fc2e1 revert(amazon-bedrock): restore locked aws sdk version 2026-04-01 04:26:27 +09:00
Peter Steinberger
2001603020 fix(amazon-bedrock): pin installable aws sdk build 2026-03-31 20:19:33 +01:00
Peter Steinberger
91be36ca4f build: prepare 2026.3.31-beta.1 release 2026-03-31 19:32:49 +01:00
Peter Steinberger
c425ef3e74 build: bump version to 2026.3.31 2026-03-31 15:48:00 +01:00
Peter Steinberger
c1ea0ae9c8 build: update deps and align pi sdk usage 2026-03-31 22:56:20 +09:00
Peter Steinberger
f3bf7fe53a chore: bump version to 2026.3.30 2026-03-30 09:28:29 +09:00
Peter Steinberger
2f19b303c6 build: fix packaged plugin dependency ownership 2026-03-29 22:21:29 +01:00
Peter Steinberger
637b4c8193 refactor: move remaining provider policy into plugins 2026-03-29 23:05:58 +09:00
Peter Steinberger
f1af7d66d2 chore: bump version to 2026.3.29 2026-03-29 14:33:12 +01:00
Peter Steinberger
8e0ab35b0e refactor(plugins): decouple bundled plugin runtime loading 2026-03-29 09:10:38 +01:00
Peter Steinberger
f9b1079283 build: cut 2026.3.28 stable 2026-03-29 02:33:41 +01:00
Peter Steinberger
587e18cd3f chore: prepare 2026.3.28-beta.1 release 2026-03-28 22:24:51 +00:00
Peter Steinberger
8a24cbf450 chore: bump version to 2026.3.28 2026-03-28 22:05:21 +00:00