mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
chore: deprecate /api/v2/aibridge/interceptions endpoint (#24670)
*Disclaimer: implemented by a Coder Agent using Claude Opus 4.6* Marks the `GET /api/v2/aibridge/interceptions` endpoint as deprecated in favor of `/aibridge/sessions`, which provides richer session-level aggregation including threads and agentic actions. Changes: - Add `@Deprecated` Swagger annotation to the endpoint handler - Add deprecation notice to the `codersdk.Client.AIBridgeListInterceptions` method - Regenerated OpenAPI spec with `"deprecated": true` flag The endpoint remains fully functional. Fixes https://github.com/coder/internal/issues/1339
This commit is contained in:
Generated
+1
@@ -122,6 +122,7 @@ const docTemplate = `{
|
||||
],
|
||||
"summary": "List AI Bridge interceptions",
|
||||
"operationId": "list-ai-bridge-interceptions",
|
||||
"deprecated": true,
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
|
||||
Generated
+1
@@ -95,6 +95,7 @@
|
||||
"tags": ["AI Bridge"],
|
||||
"summary": "List AI Bridge interceptions",
|
||||
"operationId": "list-ai-bridge-interceptions",
|
||||
"deprecated": true,
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
|
||||
@@ -280,6 +280,9 @@ func (f AIBridgeListSessionsFilter) asRequestOption() RequestOption {
|
||||
|
||||
// AIBridgeListInterceptions returns AI Bridge interceptions with the given
|
||||
// filter.
|
||||
//
|
||||
// Deprecated: Use AIBridgeListSessions instead, which provides richer
|
||||
// session-level aggregation including threads and agentic actions.
|
||||
func (c *Client) AIBridgeListInterceptions(ctx context.Context, filter AIBridgeListInterceptionsFilter) (AIBridgeListInterceptionsResponse, error) {
|
||||
res, err := c.Request(ctx, http.MethodGet, "/api/v2/aibridge/interceptions", nil, filter.asRequestOption(), filter.Pagination.asRequestOption(), filter.Pagination.asRequestOption())
|
||||
if err != nil {
|
||||
|
||||
@@ -92,7 +92,10 @@ func aibridgeHandler(api *API, middlewares ...func(http.Handler) http.Handler) f
|
||||
}
|
||||
|
||||
// aiBridgeListInterceptions returns all AI Bridge interceptions a user can read.
|
||||
// Optional filters with query params
|
||||
// Optional filters with query params.
|
||||
//
|
||||
// Deprecated: Use /aibridge/sessions instead, which provides richer
|
||||
// session-level aggregation including threads and agentic actions.
|
||||
//
|
||||
// @Summary List AI Bridge interceptions
|
||||
// @ID list-ai-bridge-interceptions
|
||||
@@ -105,6 +108,7 @@ func aibridgeHandler(api *API, middlewares ...func(http.Handler) http.Handler) f
|
||||
// @Param offset query int false "Offset pagination (cannot be used with after_id)"
|
||||
// @Success 200 {object} codersdk.AIBridgeListInterceptionsResponse
|
||||
// @Router /aibridge/interceptions [get]
|
||||
// @Deprecated Use /aibridge/sessions instead.
|
||||
func (api *API) aiBridgeListInterceptions(rw http.ResponseWriter, r *http.Request) {
|
||||
ctx := r.Context()
|
||||
apiKey := httpmw.APIKey(r)
|
||||
|
||||
Reference in New Issue
Block a user