Skip to content

Support web search providers in stanalone and OIDC mode - #833

Merged
thesujai merged 13 commits into
mainfrom
feat/web-search-providers
Sep 22, 2026
Merged

thesujai merged 13 commits into
mainfrom
feat/web-search-providers

Conversation

@thesujai

@thesujai thesujai commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes AGE-2268

Changes

  • Support web search providers in stanalone and OIDC mode

How was this tested?

Via APIs

Checklist

  • I have read the contributing guidelines
  • pnpm build, pnpm test, pnpm typecheck, pnpm lint:ci, and pnpm format:check pass locally
  • Tests added/updated where it makes sense
  • No hand-edits to generated code (packages/trueforge-sdk, python/trueforge_sdk, .github/fern/openapi/openapi.json, docs/openapi.json) — fork PRs omit SDK regen; maintainers regenerate after merge
  • Docs / .env.example updated if configuration or behavior changed

Note

Medium Risk
Introduces admin-managed secrets and changes when web search is enabled at turn time; mitigations include key redaction and existing SSRF guard on Parallel fetches.

Overview
Adds tenant-configurable web search so built-in search/fetch tools work outside TrueFoundry-managed mode. Admins get catalog discovery (GET /api/v1/catalogs/web-search-providers) and a singleton Parallel provider per tenant via GET/PUT /api/v1/settings/web-search-providers, with redacted API keys on read and rotate-or-keep semantics on write.

The server persists providers in a new web_search_provider table (SQLite + Postgres), wires resolution into capabilities, agent validation, and turn execution (replacing env-only provider lookup). A shipped Parallel catalog YAML and optional WEB_SEARCH_CATALOG_PATH override accompany the change.

UI/runtime: WebSearchCatalogServer ports, a Settings Web search tab (configure/update API key), and a TrueForge agent-server adapter mapping the multi-row UI onto the singleton API. SDK/OpenAPI are regenerated for the new clients.

Hardening: ParallelWebSearchProvider now uses ssrfFetch for outbound requests. Minor copy fix: session metrics show Turn vs Turns when count is 1.

Reviewed by Cursor Bugbot for commit 51f2e42. Bugbot is set up for automated code reviews on this repo. Configure here.

@changeset-bot

changeset-bot Bot commented Sep 21, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 51f2e42

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@truefoundry/trueforge-sdk Patch
@truefoundry/trueforge Minor
@truefoundry/trueforge-core Minor
@truefoundry/trueforge-ui Minor
@truefoundry/trueforge-assistant-ui-runtime Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@cursor cursor Bot 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.

Stale Bugbot comment from a previous run.

Comment thread packages/trueforge/src/db/webSearchProviderStore.ts
Comment thread packages/trueforge/src/apis/webSearchProviders.ts
Comment thread packages/trueforge/src/routes/webSearchProviderRoutes.ts Outdated
govindavashishtha and others added 3 commits September 22, 2026 03:34
- Introduced a new settings UI for configuring web search providers, allowing admins to set API keys and modes for Parallel web search in standalone/OIDC deployments.
- Added necessary types and interfaces for web search provider management in the assistant-ui-runtime and trueforge-ui packages.
- Created backend catalog functions to handle web search provider operations, including creation and updates.
- Updated the settings builder to include web search as a configurable section, enhancing the overall settings experience.

This update enhances the admin capabilities for managing web search integrations within the application.

@heerambavi1998 heerambavi1998 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please add tests for

  • ensuring API key is redacted
  • ensuring capabilities endpoint is giving correct response for all modes

Comment thread packages/trueforge/src/schemas/webSearchProvider.ts Outdated
Comment thread packages/trueforge/src/schemas/webSearchProvider.ts Outdated
Comment thread packages/trueforge/src/schemas/webSearchCatalog.ts
Comment thread packages/trueforge/src/routes/openapiTags.ts
Comment thread packages/trueforge/src/apis/webSearchProviders.ts Outdated
Comment thread packages/trueforge/src/apis/webSearchProviders.ts Outdated
Comment thread packages/trueforge/src/apis/webSearchProviders.ts Outdated
Comment thread packages/trueforge/catalog/web-search-catalog.yaml Outdated
Comment thread packages/trueforge/src/db/webSearchProviderStore.ts Outdated

@cursor cursor Bot 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.

Stale Bugbot comment from a previous run.

@cursor cursor Bot 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.

Stale Bugbot comment from a previous run.

Comment thread packages/trueforge/src/schemas/webSearchProvider.ts

@cursor cursor Bot 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 3f3e419. Configure here.

Comment thread packages/trueforge/src/schemas/webSearchProvider.ts
Comment thread .github/fern/openapi/openapi.json
@thesujai
thesujai merged commit 829ac6e into main Sep 22, 2026
14 checks passed
@thesujai
thesujai deleted the feat/web-search-providers branch September 22, 2026 12:11
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.

3 participants