vllm.connections
¶
Classes:
-
HTTPConnection–Helper class to send HTTP requests.
-
HTTPResponseSizeExceededError–Raised when an HTTP response exceeds a caller-supplied byte ceiling.
-
MediaDownloadSizeExceededError–Raised when a remote media download exceeds the configured byte limit.
-
MediaRequestDownloadBudget–Thread-safe total of HTTP media bytes received for one request.
-
MediaRequestDownloadSizeExceededError–Raised when all HTTP media downloads in one request exceed the limit.
Attributes:
-
global_http_connection–The global
HTTPConnectioninstance used
global_http_connection = HTTPConnection()
module-attribute
¶
The global HTTPConnection instance used
by vLLM.
HTTPConnection
¶
Helper class to send HTTP requests.
Source code in vllm/connections.py
371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 | |
HTTPResponseSizeExceededError
¶
Bases: VLLMValidationError
Raised when an HTTP response exceeds a caller-supplied byte ceiling.
Source code in vllm/connections.py
MediaDownloadSizeExceededError
¶
Bases: ValueError
Raised when a remote media download exceeds the configured byte limit.
Source code in vllm/connections.py
MediaRequestDownloadBudget
¶
Thread-safe total of HTTP media bytes received for one request.
Source code in vllm/connections.py
MediaRequestDownloadSizeExceededError
¶
Bases: ValueError
Raised when all HTTP media downloads in one request exceed the limit.
_async_retry(fn)
¶
Add retry logic with exponential backoff to an async method.
The decorated method must accept timeout as a keyword argument.
The decorator replaces it with a per-attempt timeout that grows by
_RETRY_BACKOFF_FACTOR on each retry so transient slowness on busy
hosts is absorbed.
Source code in vllm/connections.py
_is_retryable(exc)
¶
Return True for transient errors that are worth retrying.
Retryable
- Timeouts (aiohttp, requests, stdlib)
- Connection-level failures (refused, reset, DNS)
- Server errors (5xx) -- includes S3 503 SlowDown
Not retryable: - Client errors (4xx) -- bad URL, auth, not-found - Programming errors (ValueError, TypeError, ...)
Source code in vllm/connections.py
_sync_retry(fn)
¶
Add retry logic with exponential backoff to a sync method.
The decorated method must accept timeout as a keyword argument.
The decorator replaces it with a per-attempt timeout that grows by
_RETRY_BACKOFF_FACTOR on each retry so transient slowness on busy
hosts is absorbed.