| … | … | @@ -0,0 +1,323 @@ | |
| 87 | + | }), | |
| 88 | + | ), | |
| 89 | + | has_more: Schema.optionalKey(Schema.Boolean), | |
| 90 | + | last_id: Schema.optionalKey(Schema.String), | |
🟠 High speech/SpeechCleanupApi.ts:77
Anthropic model discovery fails for valid model-list pages when capabilities or last_id is null, because ModelPage rejects those values and the response decode fails. Make both optional fields nullable; the existing checks already handle null as absent.
| 1 | - capabilities: Schema.optionalKey( |
| 2 | - Schema.Struct({ |
| 3 | + capabilities: Schema.optionalKey( |
| 4 | + Schema.NullOr( |
| 5 | + Schema.Struct({ |
| 6 | effort: Schema.optionalKey( |
| 7 | Schema.Record( |
| 8 | Schema.String, |
| 9 | Schema.Union([Schema.Boolean, Schema.Struct({ supported: Schema.Boolean })]), |
| 10 | ), |
| 11 | ), |
| 12 | - }), |
| 13 | + }), |
| 14 | + ), |
| 15 | ), |
| 16 | @@ |
| 17 | - last_id: Schema.optionalKey(Schema.String), |
| 18 | + last_id: Schema.optionalKey(Schema.NullOr(Schema.String)), |
🤖 Copy this AI Prompt to have your agent fix this:
| 1 | In file @apps/server/src/speech/SpeechCleanupApi.ts around lines 77-90: |
| 2 | |
| 3 | Anthropic model discovery fails for valid model-list pages when `capabilities` or `last_id` is `null`, because `ModelPage` rejects those values and the response decode fails. Make both optional fields nullable; the existing checks already handle `null` as absent. |