🧹 feat: Automatic File Cleanup for Mistral OCR Uploads (#8827)

* chore: Handle optional token_endpoint in OAuth metadata discovery

* chore: Simplify permission typing logic in checkAccess function

* feat: Implement `deleteMistralFile` function and integrate file cleanup in `uploadMistralOCR`
This commit is contained in:
Danny Avila 2025-08-03 17:11:14 -04:00 committed by GitHub
parent 7ef2c626e2
commit 33834cd484
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 438 additions and 12 deletions

View file

@ -602,7 +602,7 @@ export class MCPOAuthHandler {
/** Auto-discover OAuth configuration for refresh */
const oauthMetadata = await discoverAuthorizationServerMetadata(metadata.serverUrl);
if (!oauthMetadata.token_endpoint) {
if (!oauthMetadata?.token_endpoint) {
throw new Error('No token endpoint found in OAuth metadata');
}