mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: byok observability api (#24207)
## Summary
Exposes `credential_kind` and `credential_hint` on AI Bridge session
threads, making credential metadata visible in the session detail API.
Each thread in the `/api/v2/aibridge/sessions/{session_id}` response now
includes:
- `credential_kind`: `centralized` or `byok`
- `credential_hint`: masked credential (e.g. `sk-a...pgAA`)
Values are taken from the thread's root interception.
## Changes
- `codersdk/aibridge.go`: Added `CredentialKind` and `CredentialHint`
fields to `AIBridgeThread`
- `coderd/database/db2sdk/db2sdk.go`: Populated from root interception
in `buildAIBridgeThread`
- `SessionTimeline.stories.tsx`: Added fields to mock thread data
This commit is contained in:
Generated
+2
@@ -334,6 +334,8 @@ curl -X GET http://coder-server:8080/api/v2/aibridge/sessions/{session_id} \
|
||||
]
|
||||
}
|
||||
],
|
||||
"credential_hint": "string",
|
||||
"credential_kind": "string",
|
||||
"ended_at": "2019-08-24T14:15:22Z",
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"model": "string",
|
||||
|
||||
Generated
+6
@@ -884,6 +884,8 @@
|
||||
]
|
||||
}
|
||||
],
|
||||
"credential_hint": "string",
|
||||
"credential_kind": "string",
|
||||
"ended_at": "2019-08-24T14:15:22Z",
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"model": "string",
|
||||
@@ -1019,6 +1021,8 @@
|
||||
]
|
||||
}
|
||||
],
|
||||
"credential_hint": "string",
|
||||
"credential_kind": "string",
|
||||
"ended_at": "2019-08-24T14:15:22Z",
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"model": "string",
|
||||
@@ -1043,6 +1047,8 @@
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
|-------------------|----------------------------------------------------------------------------------------|----------|--------------|-------------|
|
||||
| `agentic_actions` | array of [codersdk.AIBridgeAgenticAction](#codersdkaibridgeagenticaction) | false | | |
|
||||
| `credential_hint` | string | false | | |
|
||||
| `credential_kind` | string | false | | |
|
||||
| `ended_at` | string | false | | |
|
||||
| `id` | string | false | | |
|
||||
| `model` | string | false | | |
|
||||
|
||||
Reference in New Issue
Block a user