Skip to content

Pass provider settings to model discovery#123

Merged
intel352 merged 3 commits into
masterfrom
fix/provider-settings-model-selection
Jul 6, 2026
Merged

Pass provider settings to model discovery#123
intel352 merged 3 commits into
masterfrom
fix/provider-settings-model-selection

Conversation

@intel352

@intel352 intel352 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • carry provider-specific settings through AddProviderReq and daemon storage
  • prompt Bedrock users for AWS access key ID, hidden secret access key, region, and optional session token
  • pass settings into dynamic model enumeration so Bedrock can list real Anthropic models via workflow-plugin-agent v0.12.5
  • keep custom model entry as the fallback when dynamic enumeration fails

Provider behavior

  • OpenAI API, Anthropic, Gemini, GitHub Copilot, ChatGPT account auth, and local providers continue using provider-owned dynamic model discovery
  • Bedrock now supplies the extra AWS settings needed by the provider-owned dynamic discovery path

Tests

  • go test ./cmd/ratchet ./internal/daemon ./internal/provider -count=1
  • go test ./internal/tui -run TestTUIBinarySmoke -count=1
  • go test ./... (provider-related packages passed; one full-suite run hit a timing-sensitive TestTUIBinarySmoke timeout, then the isolated smoke test passed)

Upstream

Copilot AI review requested due to automatic review settings July 6, 2026 08:28

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR threads provider-specific “settings” through the provider add flow (CLI → proto → daemon DB) and into dynamic model discovery, with a focus on enabling AWS Bedrock-backed Anthropic model enumeration via workflow-plugin-agent v0.12.5.

Changes:

  • Add a settings field to AddProviderReq and persist normalized settings in the daemon DB.
  • Add Bedrock-specific credential prompting in the CLI and pass settings into dynamic model listing.
  • Bump workflow-plugin-agent (and related AWS SDK deps) to support settings-aware model discovery.

Reviewed changes

Copilot reviewed 8 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
internal/provider/models.go Adds a settings-aware wrapper for model listing.
internal/provider/auth.go Generalizes hidden secret prompting via PromptSecret.
internal/proto/ratchet.proto Extends AddProviderReq with a settings field.
internal/proto/ratchet.pb.go Regenerates protobuf output to include settings.
internal/daemon/service.go Normalizes/validates settings and persists them on upsert.
internal/daemon/e2e_provider_test.go Adds E2E coverage for settings persistence/validation.
cmd/ratchet/cmd_provider.go Prompts Bedrock credentials/settings; passes settings into model discovery and AddProvider.
cmd/ratchet/cmd_provider_test.go Adds unit tests for settings JSON and Bedrock prompt helpers; updates model selection tests for settings passing.
go.mod Bumps workflow-plugin-agent and updates indirect AWS deps.
go.sum Updates sums for bumped/new dependencies.
Files not reviewed (1)
  • internal/proto/ratchet.pb.go: Generated file

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread cmd/ratchet/cmd_provider.go Outdated
Comment thread internal/daemon/service.go
Comment thread cmd/ratchet/cmd_provider.go Outdated
@intel352
intel352 merged commit c3b06ad into master Jul 6, 2026
14 checks passed
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