Skip to content

feat(sdk): default to Claude Sonnet 5 and add a Bedrock model picker in Workflow Insight#716

Merged
ParidelPooya merged 2 commits into
mainfrom
feat/insight-bedrock-model-picker
Jul 14, 2026
Merged

feat(sdk): default to Claude Sonnet 5 and add a Bedrock model picker in Workflow Insight#716
ParidelPooya merged 2 commits into
mainfrom
feat/insight-bedrock-model-picker

Conversation

@ParidelPooya

Copy link
Copy Markdown
Contributor

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
ParidelPooya force-pushed the feat/insight-bedrock-model-picker branch from c0c840c to 81ec710 Compare July 14, 2026 17:56
…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
ParidelPooya force-pushed the feat/insight-bedrock-model-picker branch from 81ec710 to 5001620 Compare July 14, 2026 18:23
@ParidelPooya
ParidelPooya marked this pull request as ready for review July 14, 2026 18:59
@ParidelPooya
ParidelPooya merged commit 980edd1 into main Jul 14, 2026
16 checks passed
@ParidelPooya
ParidelPooya deleted the feat/insight-bedrock-model-picker branch July 14, 2026 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants