Skip to content

fix(tools): normalize provider override input in MCP search#68

Open
mouse-value-add wants to merge 2 commits into
brainsparker:mainfrom
mouse-value-add:chore/frugal-morning-20260528-provider-input-normalization
Open

fix(tools): normalize provider override input in MCP search#68
mouse-value-add wants to merge 2 commits into
brainsparker:mainfrom
mouse-value-add:chore/frugal-morning-20260528-provider-input-normalization

Conversation

@mouse-value-add

Copy link
Copy Markdown
Contributor

Summary

  • normalize provider input in frugal__search by trimming whitespace and lowercasing
  • treat formatted variants like " AuTo " as auto-routing instead of unknown provider errors
  • add focused tests covering normalized explicit provider and normalized auto sentinel

Why

frugal__search already normalizes freshness, but provider override parsing was strict. This caused avoidable errors when clients sent extra whitespace or mixed case, and made auto routing brittle for non-canonical formatting.

Validation

  • go test ./internal/mcp/tools ./...

Backward compatibility

  • fully backward-compatible
  • canonical values continue to behave exactly the same
  • only expands accepted input forms for provider

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.

1 participant