andrep2222 and andrep
66bf96c62d
Forward user info headers to Mistral OCR API ( #27253 )
...
Mirrors the ENABLE_FORWARD_USER_INFO_HEADERS pattern already used by
the audio/TTS and external document loader integrations, so the
Mistral OCR backend can identify the requesting user the same way.
Co-authored-by: andrep <vpham@aut.ac.nz >
2026-07-23 12:33:19 -05:00
Timothy Jaeryang Baek
0c7908b9f2
chore: format
2026-06-29 13:45:00 -05:00
Timothy Jaeryang Baek
3dc526475d
refac
2026-06-29 13:39:29 -05:00
Timothy Jaeryang Baek
89709f5f80
refac
2026-06-29 13:39:08 -05:00
Classic298
c3394288bb
fix: repair Mistral OCR async upload (aiohttp.streams.FilePayload removed) ( #25779 )
...
_upload_file_async built its multipart body with
`aiohttp.streams.FilePayload(...)`, which no longer exists in aiohttp
(payload classes live in aiohttp.payload, and there is no FilePayload).
The reference sits inside a lazy closure, so import succeeds and only the
async Mistral OCR file-upload path blows up at runtime with
AttributeError on every call.
Mirror the working sync path: open the file in a context manager and let
MultipartWriter.append(file_obj, {...}) build a streaming
BufferedReaderPayload, with the POST issued inside the open() block so
the handle stays valid for the whole upload. Preserves the streaming /
memory-efficiency intent.
Found via the dependency-contract test suite (unit/deps/test_aiohttp.py),
which pins aiohttp.streams.FilePayload as absent.
2026-06-29 02:05:54 -05:00
Timothy Jaeryang Baek
6d0295588e
refac: modernize type annotations (PEP 604 / PEP 585)
2026-05-12 17:10:15 +09:00
Timothy Jaeryang Baek
fd25152076
refac
2026-04-20 08:34:15 +09:00
Timothy Jaeryang Baek
de3317e26b
refac
2026-03-17 17:58:01 -05:00
823b9a6dd9
chore/perf: Remove old SRC level log env vars with no impact ( #20045 )
...
* Update openai.py
* Update env.py
* Merge pull request open-webui#19030 from open-webui/dev (#119 )
Co-authored-by: Tim Baek <tim@openwebui.com >
Co-authored-by: Claude <noreply@anthropic.com >
---------
Co-authored-by: Tim Baek <tim@openwebui.com >
Co-authored-by: Claude <noreply@anthropic.com >
2025-12-20 08:16:14 -05:00
Timothy Jaeryang Baek
415b93c7c3
enh: configurable mistral ocr base url
2025-11-05 23:25:51 -05:00
Bela Vizi
9623ef4360
add trust env to clientsession
2025-07-02 17:59:56 +02:00
PVBLIC Foundation
cf3635ba25
Update mistral.py
...
1. Intelligent Error Handling
Added _is_retryable_error() method to distinguish retryable vs non-retryable errors
Prevents unnecessary retries on client errors (4xx) that won't succeed
Caps retry delay at 30 seconds to prevent excessive waiting
2. Optimized Timeout Configuration
Upload: Capped at 2 minutes (was using full 5-minute timeout)
URL requests: 30 seconds (should be fast)
OCR processing: Full timeout (can take time)
Cleanup: 30 seconds (should be quick)
3. Enhanced Connection Pool
Increased connection limits: 20 total, 10 per host
Longer DNS cache TTL (10 minutes vs 5 minutes)
Increased keepalive timeout (60s vs 30s)
Added async DNS resolver for better performance
Granular timeout controls (connect, read, total)
4. Concurrency Control for Batch Processing
Added semaphore-based concurrency control (default: 5 concurrent)
Prevents API overwhelming while maintaining throughput
Configurable concurrency limit per workload
5. Memory Efficient Result Processing
Early exit for empty content validation
Better error metadata for debugging
Added content length tracking
Streamlined page processing logic
6. General Performance Improvements
Better error logging with truncated responses
Optimized metadata creation
Improved debug logging efficiency
2025-05-30 20:06:29 -07:00
Timothy Jaeryang Baek
8b5e89eada
chore: format
2025-05-24 00:43:38 +04:00
PVBLIC Foundation
bf193dfb5d
Update mistral.py
2025-05-23 10:00:19 -07:00
Patrick Wachter
c5a8d2f857
refactor: update MistralLoader documentation and adjust parameters for signed URL retrieval
2025-04-01 20:14:34 +02:00
Patrick Wachter
93d7702e8c
refactor: move MistralLoader to a separate module and just use the requests package instead of mistralai
2025-04-01 20:14:34 +02:00