Commit Graph

4111 Commits

Author SHA1 Message Date
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
Andrii Furmanets
379f0d78e6 Slack: route live DM replies to channel 2026-04-05 19:53:23 +09:00
Vincent Koc
63db3443f1 fix(plugin-sdk): prefer canonical private-network opt-in 2026-04-05 11:45:09 +01:00
Peter Steinberger
2d7ec1b641 refactor: split zai config sdk seam 2026-04-05 11:19:05 +01:00
Peter Steinberger
be526d6423 refactor: split provider stream sdk seams 2026-04-05 11:19:05 +01:00
Peter Steinberger
0a21eebf56 fix(openai): keep gpt chat replies concise 2026-04-05 11:16:28 +01:00
Vincent Koc
f02e435188 fix(google): support gemini cli personal oauth (#61260)
* fix(google): support gemini cli personal oauth

* Apply suggestion from @greptile-apps[bot]

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* fix(google): prefer gemini settings over auth env fallback

* chore(changelog): format rebased gemini entry

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-04-05 11:12:54 +01:00
Vincent Koc
be5a2611b9 test(anthropic): reuse wizard prompter helper (#61280) 2026-04-05 11:09:00 +01:00
Vincent Koc
3b84884793 fix(agents): harden host-managed claude-cli auth path (#61276) 2026-04-05 11:02:18 +01:00
Vincent Koc
3fa70f3044 fix(google): support gemini cli 2.5 model ids (#61261)
* fix(google): realign gemini cli model defaults

* fix(google): keep gemini cli defaults while adding 2.5 support

* fix(google): preserve gemini template reasoning flags

* fix(google): fall back to cli templates for gemini 2.5 ids

* fix(google): keep gemini cli 3.1 clones local
2026-04-05 10:43:20 +01:00
Vincent Koc
d609f71c9b fix(feishu): gate reasoning previews to stream sessions (#61271) 2026-04-05 10:40:22 +01:00
Peter Steinberger
e468da1040 fix: improve gpt execution flow and visibility 2026-04-05 10:32:58 +01:00
Vincent Koc
4954d025e2 fix(telegram): gate reasoning previews to stream sessions (#61266) 2026-04-05 10:22:26 +01:00
Peter Steinberger
1fb0b4f557 fix: avoid stale claude-cli auth fallback (#61234) (thanks @darkamenosa) 2026-04-05 18:19:33 +09:00
Tuyen
7e724c6140 Anthropic: seed claude-cli runtime auth on setup 2026-04-05 18:19:33 +09:00
Tuyen
72ba7c8995 Anthropic: address claude-cli review feedback 2026-04-05 18:19:33 +09:00
Tuyen
cd348659ce Anthropic: fix claude-cli runtime auth 2026-04-05 18:19:33 +09:00
Vincent Koc
ef3a185225 fix(ci): keep bedrock config compat inside the extension 2026-04-05 10:08:47 +01:00
wesley
1030b498de fix(acpx): retry persisted resume ids cleanly (#52209)
* fix(acpx): store agent session ID when session/load fails

When an ACP agent (e.g. Gemini CLI) rejects the acpx-generated session
ID via session/load and falls back to session/new, the agent-returned
session ID was previously discarded. This caused identity stuck at
pending forever, multi-turn failures, lost completion events, and
persistent reconcile warnings.

- Parse ACP protocol stream in runTurn() to capture agent session IDs
- Flip resolveRuntimeResumeSessionId() to prefer agentSessionId
- Add createIdentityFromHandleEvent() for handle-sourced identity
- Layer handle event identity before status in reconcile
- Add regression tests for load fallback and restart resume

Closes #52182

* ACPX: prefer decoded session ids

* ACPX: refresh runtime handle state from status

---------

Co-authored-by: Wesley <imwyvern@users.noreply.github.com>
2026-04-05 10:01:59 +01:00
Vincent Koc
2489913ede refactor(tlon): align internal network naming 2026-04-05 09:59:50 +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
Vincent Koc
4613f121ad fix(agents): preserve native Anthropic replay tool ids (#61254)
* fix(agents): preserve native Anthropic replay tool ids

* docs(changelog): note native Anthropic replay ids

* fix(agents): preserve native Anthropic replay ids selectively
2026-04-05 09:53:52 +01:00
Peter Steinberger
3d952aa35d fix(agents): preserve claude cli backend defaults 2026-04-05 17:51:41 +09:00
Vincent Koc
19e97193d3 fix(ci): make discord doctor loading bundler-safe 2026-04-05 09:48:11 +01:00
Peter Steinberger
455c642acb feat: add implicit discovery toggles 2026-04-05 09:27:48 +01:00
Peter Steinberger
bff55b55cb style: normalize import ordering and wrapping 2026-04-05 09:26:39 +01:00
Peter Steinberger
5ac07b8ef0 fix: normalize huggingface refs and discovery timeout 2026-04-05 09:18:17 +01:00
Vincent Koc
c6e117897f test(nextcloud-talk): keep send runtime mock aligned 2026-04-05 09:14:12 +01:00
Peter Steinberger
41e39eb46f refactor: register channel bootstrap capabilities 2026-04-05 09:13:48 +01:00
Peter Steinberger
b57372d665 refactor: route capability runtime through channel stores 2026-04-05 09:07:33 +01:00
Peter Steinberger
1903be5401 refactor: remove generated plugin sdk facades 2026-04-05 09:07:33 +01:00
Vincent Koc
c863ee1b86 fix(config): migrate bundled private-network aliases (#60862)
* refactor(plugin-sdk): centralize private-network opt-in semantics

* fix(config): migrate bundled private-network aliases

* fix(config): add bundled private-network doctor adapters

* fix(config): expose bundled channel migration hooks

* fix(config): prefer canonical private-network key

* test(config): refresh rebased private-network outputs
2026-04-05 08:49:44 +01:00
Peter Steinberger
07c2f81392 fix: preserve explicit Ollama apiKey during discovery 2026-04-05 08:43:50 +01:00
wzfmini01
ef5f47bd39 fix(google-gemini-cli-auth): detect bundled npm installs (#60486) (#60486)
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-04-05 08:41:43 +01:00
Peter Steinberger
d91d3cc0f0 fix: respect custom env snapshots for vertex auth 2026-04-05 08:33:54 +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
狼哥
eb130aa4e9 fix(google): disable pinned dns for image generation (#59873)
* fix(google): restore proxy-safe image generation (#59873)

* fix(ssrf): preserve transport policy without pinned dns

* fix(ssrf): use undici fetch for dispatcher requests

* fix(ssrf): type dispatcher fetch path

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-04-05 08:23:22 +01:00
Vincent Koc
155f4300ba fix(voice-call): use full config for realtime transcription (#61224)
* fix(voice-call): use full config for realtime transcription

* fix(changelog): note voice-call transcription regression

* Update CHANGELOG.md
2026-04-05 08:14:41 +01:00
Peter Steinberger
20b08f1a85 fix: enforce paired scope baselines on reconnect 2026-04-05 07:53:57 +01:00
Vincent Koc
19b7fbaa73 fix(memory): honor mocked batch fetch clients 2026-04-05 07:48:03 +01:00
Peter Steinberger
d655a8bc76 feat: add Fireworks provider and simplify plugin setup loading 2026-04-05 07:43:14 +01:00
Peter Steinberger
332afa2fda refactor: narrow claude cli fallback seams 2026-04-05 07:29:32 +01:00
Vincent Koc
3da235bf39 fix(telegram): force paginated commands callbacks 2026-04-05 07:28:47 +01:00
Peter Steinberger
657c6f6788 fix: stabilize docker e2e lanes 2026-04-05 07:15:24 +01:00
Peter Steinberger
37cc06f1fd fix: normalize claude cli fallback config 2026-04-05 07:09:13 +01:00
Ayaan Zaidi
f039bbf2aa fix: resolve acpx plugin root from shared chunks 2026-04-05 11:37:05 +05:30
Ayaan Zaidi
4cfb990382 fix: restore whatsapp doctor contract surface 2026-04-05 11:31:12 +05:30
Peter Steinberger
f7a32cd25e test: reset imessage facade runtime before each test 2026-04-05 05:58:02 +01:00
Peter Steinberger
15d5878d91 test: update telegram paginated commands expectations 2026-04-05 05:53:42 +01:00