feat(sdk): default to Claude Sonnet 5 and add a Bedrock model picker in Workflow Insight#716
Merged
Merged
Conversation
ParidelPooya
force-pushed
the
feat/insight-bedrock-model-picker
branch
from
July 14, 2026 17:56
c0c840c to
81ec710
Compare
yaythomas
reviewed
Jul 14, 2026
yaythomas
reviewed
Jul 14, 2026
yaythomas
reviewed
Jul 14, 2026
…in Workflow Insight
The previous default Bedrock model for the Workflow Insight extension's AI
features (us.anthropic.claude-sonnet-4-20250514-v1:0) is deprecated. Updates the
default to the Claude Sonnet 5 US inference profile, makes the model field much
easier to get right, and adapts the Converse calls to Sonnet 5's inference
parameters.
- Default model id is now "us.anthropic.claude-sonnet-5" (the US cross-region
inference profile, matching the prior default's shape) in config.ts,
DEFAULT_SETTINGS, the package.json setting default, the field placeholder,
and the README example.
- The Bedrock Model ID field is now an Autosuggest: it offers the models your
account can use as suggestions AND still accepts any value typed directly
(useful for profiles/regions the list doesn't surface).
- New "List available models" button fetches models for the currently
configured Region and AWS Profile via a new host module (bedrockModels.ts):
- Combines system-defined inference profiles (ListInferenceProfiles,
paginated) with on-demand, ACTIVE, text-output foundation models
(ListFoundationModels), de-duplicated and sorted.
- Base ids that only support the INFERENCE_PROFILE type are skipped (not
directly invokable — the matching profile already covers them).
- Reflects models AVAILABLE in the Region; a listed id may still require
model access to be granted in the Bedrock console (noted in the UI).
- Adds the @aws-sdk/client-bedrock dependency for the control-plane list calls.
- Wiring: a "listModels" message resolves the region/profile from the unsaved
form (configFromWireSettings) and posts a "bedrockModels" result back;
failures render inline in the Settings modal rather than as a global toast.
- Temperature handling: Claude Sonnet 5 (adaptive reasoning always on) rejects
the `temperature` inference parameter ("`temperature` is deprecated for this
model"). A new bedrockConverse.ts wraps every Converse call: it drops
temperature up front for models known to reject it (Claude 5-gen and newer)
and, as a safety net, retries once without temperature on any error that
mentions it. All three llm.ts call sites and the agentLoop.ts call route
through this helper. The helper lives in its own vscode-free module so the
agent loop doesn't pull the VS Code API into its import graph.
Tests: bedrockModels.test.ts (merge/dedupe/sort, filtering, pagination) and
bedrockConverse.test.ts (model detection, up-front strip, error-retry, and
non-temperature errors rethrown). Host suite 168 passing; host + webview
typecheck and builds green.
ParidelPooya
force-pushed
the
feat/insight-bedrock-model-picker
branch
from
July 14, 2026 18:23
81ec710 to
5001620
Compare
yaythomas
approved these changes
Jul 14, 2026
ParidelPooya
marked this pull request as ready for review
July 14, 2026 18:59
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.
The previous default Bedrock model for the Workflow Insight extension's AI features (us.anthropic.claude-sonnet-4-20250514-v1:0) is deprecated. Updates the default to the Claude Sonnet 5 US inference profile, makes the model field much easier to get right, and adapts the Converse calls to Sonnet 5's inference parameters.
temperatureinference parameter ("temperatureis deprecated for this model"). A new bedrockConverse.ts wraps every Converse call: it drops temperature up front for models known to reject it (Claude 5-gen and newer) and, as a safety net, retries once without temperature on any error that mentions it. All three llm.ts call sites and the agentLoop.ts call route through this helper. The helper lives in its own vscode-free module so the agent loop doesn't pull the VS Code API into its import graph.Tests: bedrockModels.test.ts (merge/dedupe/sort, filtering, pagination) and bedrockConverse.test.ts (model detection, up-front strip, error-retry, and non-temperature errors rethrown). Host suite 168 passing; host + webview typecheck and builds green.