Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
dynamo
Commits
57bdbdf1
Unverified
Commit
57bdbdf1
authored
Mar 03, 2026
by
Ryan Olson
Committed by
GitHub
Mar 03, 2026
Browse files
feat: upgrade rust to v1.93.0 (#6802)
Signed-off-by:
Ryan Olson
<
rolson@nvidia.com
>
parent
56212b49
Changes
20
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
94 additions
and
100 deletions
+94
-100
Cargo.lock
Cargo.lock
+14
-8
lib/bindings/c/src/lib.rs
lib/bindings/c/src/lib.rs
+1
-1
lib/bindings/kvbm/Cargo.lock
lib/bindings/kvbm/Cargo.lock
+14
-8
lib/bindings/python/Cargo.lock
lib/bindings/python/Cargo.lock
+14
-8
lib/kvbm-logical/src/manager/builder.rs
lib/kvbm-logical/src/manager/builder.rs
+2
-7
lib/kvbm-physical/src/layout/kv_block_layout.rs
lib/kvbm-physical/src/layout/kv_block_layout.rs
+2
-8
lib/kvbm-physical/src/layout/serialize.rs
lib/kvbm-physical/src/layout/serialize.rs
+2
-7
lib/llm/src/block_manager/v2/physical/layout/serialize.rs
lib/llm/src/block_manager/v2/physical/layout/serialize.rs
+2
-7
lib/llm/src/entrypoint/input/batch.rs
lib/llm/src/entrypoint/input/batch.rs
+2
-6
lib/llm/src/grpc/service/kserve.rs
lib/llm/src/grpc/service/kserve.rs
+6
-6
lib/llm/src/preprocessor.rs
lib/llm/src/preprocessor.rs
+1
-1
lib/llm/src/protocols/openai/chat_completions/aggregator.rs
lib/llm/src/protocols/openai/chat_completions/aggregator.rs
+3
-3
lib/llm/src/protocols/openai/completions/aggregator.rs
lib/llm/src/protocols/openai/completions/aggregator.rs
+3
-2
lib/llm/tests/http_namespace_integration.rs
lib/llm/tests/http_namespace_integration.rs
+2
-2
lib/parsers/src/tool_calling/json/mod.rs
lib/parsers/src/tool_calling/json/mod.rs
+2
-7
lib/runtime/examples/Cargo.lock
lib/runtime/examples/Cargo.lock
+14
-8
lib/runtime/examples/rust-toolchain.toml
lib/runtime/examples/rust-toolchain.toml
+1
-1
lib/runtime/src/distributed.rs
lib/runtime/src/distributed.rs
+2
-7
lib/runtime/src/pipeline/network.rs
lib/runtime/src/pipeline/network.rs
+6
-2
rust-toolchain.toml
rust-toolchain.toml
+1
-1
No files found.
Cargo.lock
View file @
57bdbdf1
...
@@ -2735,20 +2735,20 @@ dependencies = [
...
@@ -2735,20 +2735,20 @@ dependencies = [
"cfg-if 1.0.4",
"cfg-if 1.0.4",
"js-sys",
"js-sys",
"libc",
"libc",
"r-efi",
"r-efi
5.3.0
",
"wasip2",
"wasip2",
"wasm-bindgen",
"wasm-bindgen",
]
]
[[package]]
[[package]]
name = "getrandom"
name = "getrandom"
version = "0.4.
1
"
version = "0.4.
2
"
source = "registry+https://github.com/rust-lang/crates.io-index"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "
139ef39800118c7683f2fd3c98c1b23c09ae076556b435f8e9064ae108aaeeec
"
checksum = "
0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555
"
dependencies = [
dependencies = [
"cfg-if 1.0.4",
"cfg-if 1.0.4",
"libc",
"libc",
"r-efi",
"r-efi
6.0.0
",
"wasip2",
"wasip2",
"wasip3",
"wasip3",
]
]
...
@@ -3479,9 +3479,9 @@ dependencies = [
...
@@ -3479,9 +3479,9 @@ dependencies = [
[[package]]
[[package]]
name = "ipnet"
name = "ipnet"
version = "2.1
1
.0"
version = "2.1
2
.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "
469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130
"
checksum = "
d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2
"
[[package]]
[[package]]
name = "iri-string"
name = "iri-string"
...
@@ -5980,6 +5980,12 @@ version = "5.3.0"
...
@@ -5980,6 +5980,12 @@ version = "5.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f"
checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f"
[[package]]
name = "r-efi"
version = "6.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf"
[[package]]
[[package]]
name = "rand"
name = "rand"
version = "0.8.5"
version = "0.8.5"
...
@@ -7473,7 +7479,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
...
@@ -7473,7 +7479,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "82a72c767771b47409d2345987fda8628641887d5466101319899796367354a0"
checksum = "82a72c767771b47409d2345987fda8628641887d5466101319899796367354a0"
dependencies = [
dependencies = [
"fastrand",
"fastrand",
"getrandom 0.4.
1
",
"getrandom 0.4.
2
",
"once_cell",
"once_cell",
"rustix 1.1.4",
"rustix 1.1.4",
"windows-sys 0.61.2",
"windows-sys 0.61.2",
...
@@ -8546,7 +8552,7 @@ version = "1.21.0"
...
@@ -8546,7 +8552,7 @@ version = "1.21.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b672338555252d43fd2240c714dc444b8c6fb0a5c5335e65a07bba7742735ddb"
checksum = "b672338555252d43fd2240c714dc444b8c6fb0a5c5335e65a07bba7742735ddb"
dependencies = [
dependencies = [
"getrandom 0.4.
1
",
"getrandom 0.4.
2
",
"js-sys",
"js-sys",
"serde_core",
"serde_core",
"wasm-bindgen",
"wasm-bindgen",
...
...
lib/bindings/c/src/lib.rs
View file @
57bdbdf1
...
@@ -994,7 +994,7 @@ pub unsafe extern "C" fn free_routing_result(result: *mut CRoutingResult) {
...
@@ -994,7 +994,7 @@ pub unsafe extern "C" fn free_routing_result(result: *mut CRoutingResult) {
// Free token IDs
// Free token IDs
if
!
res
.token_ids
.is_null
()
&&
res
.token_count
>
0
{
if
!
res
.token_ids
.is_null
()
&&
res
.token_count
>
0
{
drop
(
unsafe
{
drop
(
unsafe
{
Box
::
from_raw
(
std
::
slice
::
from_raw_parts_mut
(
Box
::
from_raw
(
std
::
ptr
::
slice
_
from_raw_parts_mut
(
res
.token_ids
,
res
.token_ids
,
res
.token_count
,
res
.token_count
,
))
))
...
...
lib/bindings/kvbm/Cargo.lock
View file @
57bdbdf1
...
@@ -2287,20 +2287,20 @@ dependencies = [
...
@@ -2287,20 +2287,20 @@ dependencies = [
"cfg-if 1.0.4",
"cfg-if 1.0.4",
"js-sys",
"js-sys",
"libc",
"libc",
"r-efi",
"r-efi
5.3.0
",
"wasip2",
"wasip2",
"wasm-bindgen",
"wasm-bindgen",
]
]
[[package]]
[[package]]
name = "getrandom"
name = "getrandom"
version = "0.4.
1
"
version = "0.4.
2
"
source = "registry+https://github.com/rust-lang/crates.io-index"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "
139ef39800118c7683f2fd3c98c1b23c09ae076556b435f8e9064ae108aaeeec
"
checksum = "
0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555
"
dependencies = [
dependencies = [
"cfg-if 1.0.4",
"cfg-if 1.0.4",
"libc",
"libc",
"r-efi",
"r-efi
6.0.0
",
"wasip2",
"wasip2",
"wasip3",
"wasip3",
]
]
...
@@ -2898,9 +2898,9 @@ dependencies = [
...
@@ -2898,9 +2898,9 @@ dependencies = [
[[package]]
[[package]]
name = "ipnet"
name = "ipnet"
version = "2.1
1
.0"
version = "2.1
2
.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "
469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130
"
checksum = "
d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2
"
[[package]]
[[package]]
name = "iri-string"
name = "iri-string"
...
@@ -5199,6 +5199,12 @@ version = "5.3.0"
...
@@ -5199,6 +5199,12 @@ version = "5.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f"
checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f"
[[package]]
name = "r-efi"
version = "6.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf"
[[package]]
[[package]]
name = "rand"
name = "rand"
version = "0.8.5"
version = "0.8.5"
...
@@ -6375,7 +6381,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
...
@@ -6375,7 +6381,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "82a72c767771b47409d2345987fda8628641887d5466101319899796367354a0"
checksum = "82a72c767771b47409d2345987fda8628641887d5466101319899796367354a0"
dependencies = [
dependencies = [
"fastrand",
"fastrand",
"getrandom 0.4.
1
",
"getrandom 0.4.
2
",
"once_cell",
"once_cell",
"rustix 1.1.4",
"rustix 1.1.4",
"windows-sys 0.61.2",
"windows-sys 0.61.2",
...
@@ -7311,7 +7317,7 @@ version = "1.21.0"
...
@@ -7311,7 +7317,7 @@ version = "1.21.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b672338555252d43fd2240c714dc444b8c6fb0a5c5335e65a07bba7742735ddb"
checksum = "b672338555252d43fd2240c714dc444b8c6fb0a5c5335e65a07bba7742735ddb"
dependencies = [
dependencies = [
"getrandom 0.4.
1
",
"getrandom 0.4.
2
",
"js-sys",
"js-sys",
"serde_core",
"serde_core",
"wasm-bindgen",
"wasm-bindgen",
...
...
lib/bindings/python/Cargo.lock
View file @
57bdbdf1
...
@@ -2347,20 +2347,20 @@ dependencies = [
...
@@ -2347,20 +2347,20 @@ dependencies = [
"cfg-if 1.0.4",
"cfg-if 1.0.4",
"js-sys",
"js-sys",
"libc",
"libc",
"r-efi",
"r-efi
5.3.0
",
"wasip2",
"wasip2",
"wasm-bindgen",
"wasm-bindgen",
]
]
[[package]]
[[package]]
name = "getrandom"
name = "getrandom"
version = "0.4.
1
"
version = "0.4.
2
"
source = "registry+https://github.com/rust-lang/crates.io-index"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "
139ef39800118c7683f2fd3c98c1b23c09ae076556b435f8e9064ae108aaeeec
"
checksum = "
0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555
"
dependencies = [
dependencies = [
"cfg-if 1.0.4",
"cfg-if 1.0.4",
"libc",
"libc",
"r-efi",
"r-efi
6.0.0
",
"wasip2",
"wasip2",
"wasip3",
"wasip3",
]
]
...
@@ -2958,9 +2958,9 @@ dependencies = [
...
@@ -2958,9 +2958,9 @@ dependencies = [
[[package]]
[[package]]
name = "ipnet"
name = "ipnet"
version = "2.1
1
.0"
version = "2.1
2
.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "
469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130
"
checksum = "
d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2
"
[[package]]
[[package]]
name = "iri-string"
name = "iri-string"
...
@@ -5257,6 +5257,12 @@ version = "5.3.0"
...
@@ -5257,6 +5257,12 @@ version = "5.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f"
checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f"
[[package]]
name = "r-efi"
version = "6.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf"
[[package]]
[[package]]
name = "rand"
name = "rand"
version = "0.8.5"
version = "0.8.5"
...
@@ -6433,7 +6439,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
...
@@ -6433,7 +6439,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "82a72c767771b47409d2345987fda8628641887d5466101319899796367354a0"
checksum = "82a72c767771b47409d2345987fda8628641887d5466101319899796367354a0"
dependencies = [
dependencies = [
"fastrand",
"fastrand",
"getrandom 0.4.
1
",
"getrandom 0.4.
2
",
"once_cell",
"once_cell",
"rustix 1.1.4",
"rustix 1.1.4",
"windows-sys 0.61.2",
"windows-sys 0.61.2",
...
@@ -7369,7 +7375,7 @@ version = "1.21.0"
...
@@ -7369,7 +7375,7 @@ version = "1.21.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b672338555252d43fd2240c714dc444b8c6fb0a5c5335e65a07bba7742735ddb"
checksum = "b672338555252d43fd2240c714dc444b8c6fb0a5c5335e65a07bba7742735ddb"
dependencies = [
dependencies = [
"getrandom 0.4.
1
",
"getrandom 0.4.
2
",
"js-sys",
"js-sys",
"serde_core",
"serde_core",
"wasm-bindgen",
"wasm-bindgen",
...
...
lib/kvbm-logical/src/manager/builder.rs
View file @
57bdbdf1
...
@@ -25,11 +25,12 @@ use super::BlockManager;
...
@@ -25,11 +25,12 @@ use super::BlockManager;
/// Capacity settings for the TinyLFU frequency tracker used by
/// Capacity settings for the TinyLFU frequency tracker used by
/// [`BlockRegistry`] and the multi-level LRU backend.
/// [`BlockRegistry`] and the multi-level LRU backend.
#[derive(Debug,
Clone,
Copy,
PartialEq,
Eq)]
#[derive(Debug,
Clone,
Copy,
PartialEq,
Eq
,
Default
)]
pub
enum
FrequencyTrackingCapacity
{
pub
enum
FrequencyTrackingCapacity
{
/// Small capacity: 2^18 (262,144) entries
/// Small capacity: 2^18 (262,144) entries
Small
,
Small
,
/// Medium capacity: 2^21 (2,097,152) entries - default
/// Medium capacity: 2^21 (2,097,152) entries - default
#[default]
Medium
,
Medium
,
/// Large capacity: 2^24 (16,777,216) entries
/// Large capacity: 2^24 (16,777,216) entries
Large
,
Large
,
...
@@ -51,12 +52,6 @@ impl FrequencyTrackingCapacity {
...
@@ -51,12 +52,6 @@ impl FrequencyTrackingCapacity {
}
}
}
}
impl
Default
for
FrequencyTrackingCapacity
{
fn
default
()
->
Self
{
Self
::
Medium
}
}
/// Configuration for the inactive pool backend.
/// Configuration for the inactive pool backend.
pub
enum
InactiveBackendConfig
{
pub
enum
InactiveBackendConfig
{
/// HashMap with configurable reuse policy
/// HashMap with configurable reuse policy
...
...
lib/kvbm-physical/src/layout/kv_block_layout.rs
View file @
57bdbdf1
...
@@ -36,7 +36,7 @@ pub enum BlockDim {
...
@@ -36,7 +36,7 @@ pub enum BlockDim {
///
///
/// - `UniversalTP`: `[nh, nl, no, nt, hd]` - heads outermost for TP resharding
/// - `UniversalTP`: `[nh, nl, no, nt, hd]` - heads outermost for TP resharding
/// - `OperationalNHD`: `[nl, no, nt, nh, hd]` - inner is `[nt, nh, hd]`
/// - `OperationalNHD`: `[nl, no, nt, nh, hd]` - inner is `[nt, nh, hd]`
#[derive(Debug,
Clone,
Copy,
PartialEq,
Eq,
Hash,
Serialize,
Deserialize)]
#[derive(Debug,
Clone,
Copy,
PartialEq,
Eq,
Hash,
Serialize,
Deserialize
,
Default
)]
pub
enum
KvBlockLayout
{
pub
enum
KvBlockLayout
{
/// Universal format: `[nh, nl, no, nt, hd]`
/// Universal format: `[nh, nl, no, nt, hd]`
///
///
...
@@ -71,16 +71,10 @@ pub enum KvBlockLayout {
...
@@ -71,16 +71,10 @@ pub enum KvBlockLayout {
///
///
/// Operations involving Unknown layouts may fail or require explicit
/// Operations involving Unknown layouts may fail or require explicit
/// configuration.
/// configuration.
#[default]
Unknown
,
Unknown
,
}
}
impl
Default
for
KvBlockLayout
{
fn
default
()
->
Self
{
// Unknown until runtime detection determines the actual format
Self
::
Unknown
}
}
impl
KvBlockLayout
{
impl
KvBlockLayout
{
/// Get the dimension ordering as an array.
/// Get the dimension ordering as an array.
///
///
...
...
lib/kvbm-physical/src/layout/serialize.rs
View file @
57bdbdf1
...
@@ -17,18 +17,13 @@ use serde::{Deserialize, Serialize};
...
@@ -17,18 +17,13 @@ use serde::{Deserialize, Serialize};
/// This enum describes how the blocks are organized and formatted in memory.
/// This enum describes how the blocks are organized and formatted in memory.
/// Currently only `Operational` is supported, but future variants may include
/// Currently only `Operational` is supported, but future variants may include
/// different compression schemes or memory layouts.
/// different compression schemes or memory layouts.
#[derive(Debug,
Clone,
Copy,
PartialEq,
Eq,
Serialize,
Deserialize)]
#[derive(Debug,
Clone,
Copy,
PartialEq,
Eq,
Serialize,
Deserialize
,
Default
)]
pub
enum
BlockFormat
{
pub
enum
BlockFormat
{
/// Standard operational format - blocks are stored in their normal, uncompressed form.
/// Standard operational format - blocks are stored in their normal, uncompressed form.
#[default]
Operational
,
Operational
,
}
}
impl
Default
for
BlockFormat
{
fn
default
()
->
Self
{
Self
::
Operational
}
}
/// Details specific to fully contiguous layouts.
/// Details specific to fully contiguous layouts.
#[derive(Debug,
Clone,
Serialize,
Deserialize)]
#[derive(Debug,
Clone,
Serialize,
Deserialize)]
pub
struct
FullyContiguousDetails
{
pub
struct
FullyContiguousDetails
{
...
...
lib/llm/src/block_manager/v2/physical/layout/serialize.rs
View file @
57bdbdf1
...
@@ -17,18 +17,13 @@ use serde::{Deserialize, Serialize};
...
@@ -17,18 +17,13 @@ use serde::{Deserialize, Serialize};
/// This enum describes how the blocks are organized and formatted in memory.
/// This enum describes how the blocks are organized and formatted in memory.
/// Currently only `Operational` is supported, but future variants may include
/// Currently only `Operational` is supported, but future variants may include
/// different compression schemes or memory layouts.
/// different compression schemes or memory layouts.
#[derive(Debug,
Clone,
Copy,
PartialEq,
Eq,
Serialize,
Deserialize)]
#[derive(Debug,
Clone,
Copy,
PartialEq,
Eq,
Serialize,
Deserialize
,
Default
)]
pub
enum
BlockFormat
{
pub
enum
BlockFormat
{
/// Standard operational format - blocks are stored in their normal, uncompressed form.
/// Standard operational format - blocks are stored in their normal, uncompressed form.
#[default]
Operational
,
Operational
,
}
}
impl
Default
for
BlockFormat
{
fn
default
()
->
Self
{
Self
::
Operational
}
}
/// Details specific to fully contiguous layouts.
/// Details specific to fully contiguous layouts.
#[derive(Debug,
Clone,
Serialize,
Deserialize)]
#[derive(Debug,
Clone,
Serialize,
Deserialize)]
pub
struct
FullyContiguousDetails
{
pub
struct
FullyContiguousDetails
{
...
...
lib/llm/src/entrypoint/input/batch.rs
View file @
57bdbdf1
...
@@ -252,12 +252,8 @@ async fn evaluate(
...
@@ -252,12 +252,8 @@ async fn evaluate(
}
}
}
}
entry
.finish_reason
=
chat_comp
.finish_reason
;
entry
.finish_reason
=
chat_comp
.finish_reason
;
if
chat_comp
.finish_reason
.is_some
()
{
if
let
Some
(
finish_reason
)
=
chat_comp
.finish_reason
.as_ref
()
{
tracing
::
trace!
(
tracing
::
trace!
(
request_id
,
"finish reason: {:?}"
,
finish_reason
);
request_id
,
"finish reason: {:?}"
,
chat_comp
.finish_reason
.unwrap
()
);
break
;
break
;
}
}
}
}
...
...
lib/llm/src/grpc/service/kserve.rs
View file @
57bdbdf1
...
@@ -459,8 +459,8 @@ impl GrpcInferenceService for KserveService {
...
@@ -459,8 +459,8 @@ impl GrpcInferenceService for KserveService {
let
mut
reply
=
ModelStreamInferResponse
::
try_from
(
data
)
.map_err
(|
e
|
{
let
mut
reply
=
ModelStreamInferResponse
::
try_from
(
data
)
.map_err
(|
e
|
{
Status
::
invalid_argument
(
format!
(
"Failed to parse response: {}"
,
e
))
Status
::
invalid_argument
(
format!
(
"Failed to parse response: {}"
,
e
))
})
?
;
})
?
;
if
reply
.infer_response
.
i
s_
some
()
{
if
let
Some
(
infer_response
)
=
reply
.infer_response
.
a
s_
mut
()
{
reply
.
infer_response
.
as_mut
()
.unwrap
()
.
id
=
request_id
.clone
();
infer_response
.id
=
request_id
.clone
();
}
}
yield
reply
;
yield
reply
;
},
},
...
@@ -514,8 +514,8 @@ impl GrpcInferenceService for KserveService {
...
@@ -514,8 +514,8 @@ impl GrpcInferenceService for KserveService {
let
mut
reply
=
ModelStreamInferResponse
::
try_from
(
data
)
.map_err
(|
e
|
{
let
mut
reply
=
ModelStreamInferResponse
::
try_from
(
data
)
.map_err
(|
e
|
{
Status
::
invalid_argument
(
format!
(
"Failed to parse response: {}"
,
e
))
Status
::
invalid_argument
(
format!
(
"Failed to parse response: {}"
,
e
))
})
?
;
})
?
;
if
reply
.infer_response
.
i
s_
some
()
{
if
let
Some
(
infer_response
)
=
reply
.infer_response
.
a
s_
mut
()
{
reply
.
infer_response
.
as_mut
()
.unwrap
()
.
id
=
request_id
.clone
();
infer_response
.id
=
request_id
.clone
();
}
}
yield
reply
;
yield
reply
;
},
},
...
@@ -538,8 +538,8 @@ impl GrpcInferenceService for KserveService {
...
@@ -538,8 +538,8 @@ impl GrpcInferenceService for KserveService {
let
mut
response
:
ModelStreamInferResponse
=
completion_response
.try_into
()
.map_err
(|
e
|
{
let
mut
response
:
ModelStreamInferResponse
=
completion_response
.try_into
()
.map_err
(|
e
|
{
Status
::
invalid_argument
(
format!
(
"Failed to parse response: {}"
,
e
))
Status
::
invalid_argument
(
format!
(
"Failed to parse response: {}"
,
e
))
})
?
;
})
?
;
if
response
.infer_response
.
i
s_
some
()
{
if
let
Some
(
infer_response
)
=
response
.infer_response
.
a
s_
mut
()
{
response
.
infer_response
.
as_mut
()
.unwrap
()
.
id
=
request_id
.clone
();
infer_response
.id
=
request_id
.clone
();
}
}
yield
response
;
yield
response
;
}
}
...
...
lib/llm/src/preprocessor.rs
View file @
57bdbdf1
...
@@ -657,7 +657,7 @@ impl OpenAIPreprocessor {
...
@@ -657,7 +657,7 @@ impl OpenAIPreprocessor {
request_id
=
inner
.context
.id
(),
request_id
=
inner
.context
.id
(),
"Cancellation issued last message; closing stream"
"Cancellation issued last message; closing stream"
);
);
inner
.finished
=
true
;
// Mark as finished
//
inner.finished = true; // Mark as finished
return
None
;
return
None
;
}
}
...
...
lib/llm/src/protocols/openai/chat_completions/aggregator.rs
View file @
57bdbdf1
...
@@ -133,9 +133,9 @@ impl DeltaAggregator {
...
@@ -133,9 +133,9 @@ impl DeltaAggregator {
}
}
};
};
if
aggregator
.error
.is_none
()
&&
delta
.data
.is_some
()
{
if
aggregator
.error
.is_none
()
// Extract the data payload from the
delta.
&&
let
Some
(
delta
)
=
delta
.
data
let
delta
=
delta
.data
.unwrap
();
{
aggregator
.id
=
delta
.id
;
aggregator
.id
=
delta
.id
;
aggregator
.model
=
delta
.model
;
aggregator
.model
=
delta
.model
;
aggregator
.created
=
delta
.created
;
aggregator
.created
=
delta
.created
;
...
...
lib/llm/src/protocols/openai/completions/aggregator.rs
View file @
57bdbdf1
...
@@ -70,11 +70,12 @@ impl DeltaAggregator {
...
@@ -70,11 +70,12 @@ impl DeltaAggregator {
}
}
};
};
if
aggregator
.error
.is_none
()
&&
delta
.data
.is_some
()
{
if
aggregator
.error
.is_none
()
&&
let
Some
(
delta
)
=
delta
.data
{
// TODO(#14) - Aggregate Annotation
// TODO(#14) - Aggregate Annotation
// these are cheap to move so we do it every time since we are consuming the delta
// these are cheap to move so we do it every time since we are consuming the delta
let
delta
=
delta
.data
.unwrap
();
aggregator
.id
=
delta
.inner.id
;
aggregator
.id
=
delta
.inner.id
;
aggregator
.model
=
delta
.inner.model
;
aggregator
.model
=
delta
.inner.model
;
aggregator
.created
=
delta
.inner.created
;
aggregator
.created
=
delta
.inner.created
;
...
...
lib/llm/tests/http_namespace_integration.rs
View file @
57bdbdf1
...
@@ -73,7 +73,7 @@ fn test_model_discovery_scoping_scenarios() {
...
@@ -73,7 +73,7 @@ fn test_model_discovery_scoping_scenarios() {
// Scenario 1: Frontend configured for specific namespace should only see models from that namespace
// Scenario 1: Frontend configured for specific namespace should only see models from that namespace
let
frontend_namespace
=
"vllm-agg"
;
let
frontend_namespace
=
"vllm-agg"
;
let
available_models
=
vec!
[
let
available_models
=
[
create_test_endpoint
(
"vllm-agg"
,
"backend"
,
"generate"
),
create_test_endpoint
(
"vllm-agg"
,
"backend"
,
"generate"
),
create_test_endpoint
(
"vllm-agg"
,
"backend"
,
"generate"
),
create_test_endpoint
(
"vllm-agg"
,
"backend"
,
"generate"
),
create_test_endpoint
(
"sglang-prod"
,
"backend"
,
"generate"
),
create_test_endpoint
(
"sglang-prod"
,
"backend"
,
"generate"
),
...
@@ -120,7 +120,7 @@ fn test_model_discovery_scoping_scenarios() {
...
@@ -120,7 +120,7 @@ fn test_model_discovery_scoping_scenarios() {
fn
test_namespace_boundary_conditions
()
{
fn
test_namespace_boundary_conditions
()
{
// Test edge cases and boundary conditions for namespace handling
// Test edge cases and boundary conditions for namespace handling
let
test_models
=
vec!
[
let
test_models
=
[
create_test_endpoint
(
""
,
"backend"
,
"generate"
),
// Empty namespace
create_test_endpoint
(
""
,
"backend"
,
"generate"
),
// Empty namespace
create_test_endpoint
(
"dynamo"
,
"backend"
,
"generate"
),
// Global namespace
create_test_endpoint
(
"dynamo"
,
"backend"
,
"generate"
),
// Global namespace
create_test_endpoint
(
"ns-with-special-chars_123"
,
"backend"
,
"generate"
),
create_test_endpoint
(
"ns-with-special-chars_123"
,
"backend"
,
"generate"
),
...
...
lib/parsers/src/tool_calling/json/mod.rs
View file @
57bdbdf1
...
@@ -15,21 +15,16 @@ pub use deepseek_v3_parser::{detect_tool_call_start_deepseek_v3, parse_tool_call
...
@@ -15,21 +15,16 @@ pub use deepseek_v3_parser::{detect_tool_call_start_deepseek_v3, parse_tool_call
pub
use
super
::
config
::
JsonParserConfig
;
pub
use
super
::
config
::
JsonParserConfig
;
pub
use
super
::
response
::
ToolCallResponse
;
pub
use
super
::
response
::
ToolCallResponse
;
#[derive(Clone,
Debug,
serde::Serialize,
serde::Deserialize)]
#[derive(Clone,
Debug,
serde::Serialize,
serde::Deserialize
,
Default
)]
pub
enum
JsonParserType
{
pub
enum
JsonParserType
{
// Basic is generic json parser which can handle most of the cases
// Basic is generic json parser which can handle most of the cases
#[default]
Basic
,
Basic
,
// Model Specific JSON Parsers
// Model Specific JSON Parsers
DeepseekV3
,
DeepseekV3
,
DeepseekV31
,
DeepseekV31
,
}
}
impl
Default
for
JsonParserType
{
fn
default
()
->
Self
{
Self
::
Basic
}
}
pub
fn
try_tool_call_parse_json
(
pub
fn
try_tool_call_parse_json
(
message
:
&
str
,
message
:
&
str
,
config
:
&
JsonParserConfig
,
config
:
&
JsonParserConfig
,
...
...
lib/runtime/examples/Cargo.lock
View file @
57bdbdf1
...
@@ -1212,20 +1212,20 @@ dependencies = [
...
@@ -1212,20 +1212,20 @@ dependencies = [
"cfg-if 1.0.4",
"cfg-if 1.0.4",
"js-sys",
"js-sys",
"libc",
"libc",
"r-efi",
"r-efi
5.3.0
",
"wasip2",
"wasip2",
"wasm-bindgen",
"wasm-bindgen",
]
]
[[package]]
[[package]]
name = "getrandom"
name = "getrandom"
version = "0.4.
1
"
version = "0.4.
2
"
source = "registry+https://github.com/rust-lang/crates.io-index"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "
139ef39800118c7683f2fd3c98c1b23c09ae076556b435f8e9064ae108aaeeec
"
checksum = "
0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555
"
dependencies = [
dependencies = [
"cfg-if 1.0.4",
"cfg-if 1.0.4",
"libc",
"libc",
"r-efi",
"r-efi
6.0.0
",
"wasip2",
"wasip2",
"wasip3",
"wasip3",
]
]
...
@@ -1646,9 +1646,9 @@ dependencies = [
...
@@ -1646,9 +1646,9 @@ dependencies = [
[[package]]
[[package]]
name = "ipnet"
name = "ipnet"
version = "2.1
1
.0"
version = "2.1
2
.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "
469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130
"
checksum = "
d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2
"
[[package]]
[[package]]
name = "iri-string"
name = "iri-string"
...
@@ -2726,6 +2726,12 @@ version = "5.3.0"
...
@@ -2726,6 +2726,12 @@ version = "5.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f"
checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f"
[[package]]
name = "r-efi"
version = "6.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf"
[[package]]
[[package]]
name = "rand"
name = "rand"
version = "0.8.5"
version = "0.8.5"
...
@@ -3495,7 +3501,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
...
@@ -3495,7 +3501,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "82a72c767771b47409d2345987fda8628641887d5466101319899796367354a0"
checksum = "82a72c767771b47409d2345987fda8628641887d5466101319899796367354a0"
dependencies = [
dependencies = [
"fastrand",
"fastrand",
"getrandom 0.4.
1
",
"getrandom 0.4.
2
",
"once_cell",
"once_cell",
"rustix",
"rustix",
"windows-sys 0.61.2",
"windows-sys 0.61.2",
...
@@ -4049,7 +4055,7 @@ version = "1.21.0"
...
@@ -4049,7 +4055,7 @@ version = "1.21.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b672338555252d43fd2240c714dc444b8c6fb0a5c5335e65a07bba7742735ddb"
checksum = "b672338555252d43fd2240c714dc444b8c6fb0a5c5335e65a07bba7742735ddb"
dependencies = [
dependencies = [
"getrandom 0.4.
1
",
"getrandom 0.4.
2
",
"js-sys",
"js-sys",
"serde_core",
"serde_core",
"wasm-bindgen",
"wasm-bindgen",
...
...
lib/runtime/examples/rust-toolchain.toml
View file @
57bdbdf1
[toolchain]
[toolchain]
channel
=
"1.9
0.0
"
channel
=
"1.9
3.1
"
lib/runtime/src/distributed.rs
View file @
57bdbdf1
...
@@ -619,22 +619,17 @@ impl DistributedConfig {
...
@@ -619,22 +619,17 @@ impl DistributedConfig {
/// - `Nats`: Use NATS for request distribution (legacy)
/// - `Nats`: Use NATS for request distribution (legacy)
/// - `Http`: Use HTTP/2 for request distribution
/// - `Http`: Use HTTP/2 for request distribution
/// - `Tcp`: Use raw TCP for request distribution with msgpack support (default)
/// - `Tcp`: Use raw TCP for request distribution with msgpack support (default)
#[derive(Debug,
Clone,
Copy,
PartialEq,
Eq)]
#[derive(Debug,
Clone,
Copy,
PartialEq,
Eq
,
Default
)]
pub
enum
RequestPlaneMode
{
pub
enum
RequestPlaneMode
{
/// Use NATS for request plane
/// Use NATS for request plane
Nats
,
Nats
,
/// Use HTTP/2 for request plane
/// Use HTTP/2 for request plane
Http
,
Http
,
/// Use raw TCP for request plane with msgpack support
/// Use raw TCP for request plane with msgpack support
#[default]
Tcp
,
Tcp
,
}
}
impl
Default
for
RequestPlaneMode
{
fn
default
()
->
Self
{
Self
::
Tcp
}
}
impl
fmt
::
Display
for
RequestPlaneMode
{
impl
fmt
::
Display
for
RequestPlaneMode
{
fn
fmt
(
&
self
,
f
:
&
mut
fmt
::
Formatter
<
'_
>
)
->
fmt
::
Result
{
fn
fmt
(
&
self
,
f
:
&
mut
fmt
::
Formatter
<
'_
>
)
->
fmt
::
Result
{
match
self
{
match
self
{
...
...
lib/runtime/src/pipeline/network.rs
View file @
57bdbdf1
...
@@ -163,8 +163,12 @@ impl StreamSender {
...
@@ -163,8 +163,12 @@ impl StreamSender {
#[allow(clippy::needless_update)]
#[allow(clippy::needless_update)]
pub
async
fn
send_prologue
(
&
mut
self
,
error
:
Option
<
String
>
)
->
Result
<
(),
String
>
{
pub
async
fn
send_prologue
(
&
mut
self
,
error
:
Option
<
String
>
)
->
Result
<
(),
String
>
{
if
let
Some
(
prologue
)
=
self
.prologue
.take
()
{
// leaving the original logic in place for now
let
prologue
=
ResponseStreamPrologue
{
error
,
..
prologue
};
// error overrides the dissolved prologue, but the only field on `ResponseStreamPrologue` is `error`
// so the second argument can never be used, and the value of error passed by the caller would always be used
if
let
Some
(
_
prologue
)
=
self
.prologue
.take
()
{
// let prologue = ResponseStreamPrologue { error, ..prologue };
let
prologue
=
ResponseStreamPrologue
{
error
};
let
header_bytes
:
Bytes
=
match
serde_json
::
to_vec
(
&
prologue
)
{
let
header_bytes
:
Bytes
=
match
serde_json
::
to_vec
(
&
prologue
)
{
Ok
(
b
)
=>
b
.into
(),
Ok
(
b
)
=>
b
.into
(),
Err
(
err
)
=>
{
Err
(
err
)
=>
{
...
...
rust-toolchain.toml
View file @
57bdbdf1
[toolchain]
[toolchain]
channel
=
"1.9
0.0
"
channel
=
"1.9
3.1
"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment