Surface model provider authentication recovery progress (#41239)

## What changed

- Emit turn-scoped authentication recovery started and completed events when a model provider refreshes expired credentials.
- Add stable `modelProvider/authRecoveryStarted` and `modelProvider/authRecoveryCompleted` app-server notifications with the thread, turn, provider, and user-facing message.
- Show recovery progress in the TUI and `codex exec`, including Amazon Bedrock session reauthentication.

## Testing

- Cover provider recovery success and failure events, app-server routing, client rendering, and Amazon Bedrock credential refresh.

GitOrigin-RevId: 3010c38d0676f18bced27761cf86dd38344d09f9
This commit is contained in:
alexsong-oai authored and copyberry committed 2026-08-28 01:14:02 +00:00
1 parent f1bb4c168d
commit 41d3dc56a0
33 files changed
+611 -11

No files matched your search

@@ -5572,6 +5572,46 @@
"title": "Model/verificationNotification",
"type": "object"
},
{
"properties": {
"method": {
"enum": [
"modelProvider/authRecoveryStarted"
],
"title": "ModelProvider/authRecoveryStartedNotificationMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/AuthRecoveryNotification"
}
},
"required": [
"method",
"params"
],
"title": "ModelProvider/authRecoveryStartedNotification",
"type": "object"
},
{
"properties": {
"method": {
"enum": [
"modelProvider/authRecoveryCompleted"
],
"title": "ModelProvider/authRecoveryCompletedNotificationMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/AuthRecoveryNotification"
}
},
"required": [
"method",
"params"
],
"title": "ModelProvider/authRecoveryCompletedNotification",
"type": "object"
},
{
"properties": {
"method": {
@@ -7669,6 +7709,31 @@
}
]
},
"AuthRecoveryNotification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"message": {
"type": "string"
},
"provider": {
"type": "string"
},
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
}
},
"required": [
"message",
"provider",
"threadId",
"turnId"
],
"title": "AuthRecoveryNotification",
"type": "object"
},
"AutoCompactTokenLimitScope": {
"description": "Selects which part of the active context is charged against `model_auto_compact_token_limit`.",
"oneOf": [