mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-06-29 23:41:12 +08:00
## Summary - Harden the 302.AI model driver request validation and response parsing paths. - Add focused tests for chat request mode, model listing, malformed provider responses, and input validation. ## What changed - Validate API keys, model names, rerank queries, ASR file paths, OCR inputs, parse URLs, task IDs, and model-list IDs before use. - Keep chat and streaming methods from accepting conflicting `stream` values in request payloads. - Send `ListModels` as a bodyless GET and parse the response with typed JSON structs instead of unchecked assertions. - Remove raw SSE event logging from stream handling. ## Why The driver could panic or send inconsistent requests when optional config fields were nil, empty, malformed, or contradicted the method path. This keeps provider-driver behavior explicit while preserving the existing supported 302.AI flows. Closes #14736