Skip to content

feat: filter interceptions and sessions by provider name - #25640

Merged
dannykopping merged 4 commits into
mainfrom
dk/aibridge-filter-by-provider-name
May 25, 2026
Merged

dannykopping merged 4 commits into
mainfrom
dk/aibridge-filter-by-provider-name

Conversation

@dannykopping

@dannykopping dannykopping commented May 25, 2026

Copy link
Copy Markdown
Contributor

Allows filtering sessions & interceptions by provider name, and adds a test to vaidate that provider name is immutable (at least until #25606 lands).

@github-actions

Copy link
Copy Markdown
Contributor

Docs preview

📖 View docs preview for docs/reference/api/aibridge.md

dannykopping commented May 25, 2026

Copy link
Copy Markdown
Contributor Author

Adds a provider_name filter to the AIBridge interceptions and sessions
list APIs that matches the per-row provider_name snapshot on
aibridge_interceptions. The existing provider filter (matching the
provider type column) is retained for backward compatibility; the SDK,
CLI (--provider, --provider-name), and q-string ("provider:" and
"provider_name:") accept both keys.

The provider_name parser validates the value against ai_providers.name
and errors on unknown names so typos surface at the API rather than
returning empty results. The frontend provider dropdown now populates
from GET /api/v2/ai/providers and writes provider_name: into the URL
filter.

Locks ai_providers.name immutability with TestAIProvidersCRUD/
UpdateCannotMutateName, which posts a raw JSON body containing a
"name" key and asserts the PATCH endpoint ignores it. The SDK type
and SQL update path already omit the field; this test pins the
invariant so a future field addition can't silently make names
mutable. Name immutability is a precondition for any later FK
backfill from aibridge_interceptions.provider_name to ai_providers.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@dannykopping
dannykopping force-pushed the dk/aibridge-filter-by-provider-name branch from 14e6157 to 433c9fa Compare May 25, 2026 09:28
@dannykopping dannykopping changed the title feat(aibridge): filter interceptions and sessions by provider name feat: filter interceptions and sessions by provider name May 25, 2026
@dannykopping
dannykopping marked this pull request as ready for review May 25, 2026 09:30
@dannykopping
dannykopping requested a review from johnstcn May 25, 2026 09:30
@coderagents

coderagents Bot commented May 25, 2026

Copy link
Copy Markdown
Contributor

Documentation Check

Updates Completed

  • docs/reference/api/aibridge.md - Added provider_name to search query parameter descriptions for both interceptions and sessions endpoints
  • docs/reference/cli/aibridge_interceptions_list.md - Added --provider-name flag documentation with clear distinction from --provider

Status

All documentation updates for the new provider_name filtering feature have been completed. The documentation clearly distinguishes between:

  • provider - Filter by provider type (openai, anthropic, copilot). Retained for backward compatibility.
  • provider_name - Filter by specific configured provider instance (matches ai_providers.name).

Updated review: PR updated with new commits. Documentation changes remain consistent with previous review. No additional documentation needs identified.


Automated review via Coder Agents

@dannykopping
dannykopping requested a review from jakehwll May 25, 2026 11:11
@dannykopping
dannykopping merged commit 4ddda3a into main May 25, 2026
32 checks passed
@dannykopping
dannykopping deleted the dk/aibridge-filter-by-provider-name branch May 25, 2026 14:31
@github-actions github-actions Bot locked and limited conversation to collaborators May 25, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants