Repository navigation
fix: l'API n'arrivait pas à joindre le service IA (HTTP/2 h2c refusé par uvicorn) - #163
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…panne de l'IA Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
Ajout : une demande créée pendant une panne de l'IA restait définitivement en « délai dépassé » après 2 minutes, et « Réessayer » ne faisait que relire. Maintenant chaque lecture retente le dépôt : la demande repart dès que l'IA revient. Test : |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Le bug
Avec
IA_FOURNISSEUR=service, toute demande répondait « Votre besoin n'a pas pu être analysé ». Journal de l'API :Service IA injoignable pour une demande : BadRequest. Journal du service IA :Unsupported upgrade request/Invalid HTTP request received.Cause : le
HttpClientde Java tente par défaut une montée vers HTTP/2 en clair (h2c, en-têteUpgrade) sur une adressehttp://. uvicorn ne la gère pas et répond 400. Les tests passaient car leur faux serveur acceptait la montée. En production aussi, l'orientation et la carte de compétences IA seraient tombées en repli.Ce qui a été fait
PlansIaHttp(orientation, plans) etCartesIaHttp(carte de compétences) :HttpClient.Version.HTTP_1_1.Upgradecomme uvicorn.Les autres clients HTTP (GitHub, Brevo) parlent en
https://, où HTTP/2 se négocie sans montée : pas concernés.Comment c'est vérifié
AdaptateursIaTestéchoue sans la correction (2 erreurs, 400), passe avec ;CartesIaTest6/6.Outils d'IA utilisés : Claude Code (Claude Opus 5.5).
🤖 Generated with Claude Code