[Bugfix] Reject instructions changes on locked native duplex sessions (#6318)
Signed-off-by: ANURAG KANADE <anuragkanade6@gmail.com>
This commit is contained in:
1 parent
926e7fbfa2
commit
91dd7fcaec
8 files changed
+309
-7
No files matched your search
@@ -14,6 +14,7 @@ from vllm_omni.experimental.fullduplex.minicpmo45.policy import MiniCPMO45Duplex
|
||||
from vllm_omni.experimental.fullduplex.openai.protocol import DuplexSessionConfig
|
||||
from vllm_omni.experimental.fullduplex.openai.runtime_adapter import (
|
||||
ServingRuntimeConfigError,
|
||||
reject_changed_runtime_value,
|
||||
)
|
||||
|
||||
|
||||
@@ -69,7 +70,13 @@ class MiniCPMO45NativeDuplexServingAdapter:
|
||||
current: object,
|
||||
) -> dict[str, object]:
|
||||
runtime_config = deepcopy(dict(current)) if isinstance(current, dict) else {}
|
||||
runtime_config["instructions"] = config.instructions
|
||||
reject_changed_runtime_value(
|
||||
config.instructions,
|
||||
runtime_config.get("instructions"),
|
||||
message="instructions cannot be changed after the session is created",
|
||||
code="instructions_update_unsupported",
|
||||
error_cls=MiniCPMO45ClientRuntimeConfigError,
|
||||
)
|
||||
stage_max_tokens = runtime_config.get("duplex_stage_max_tokens")
|
||||
stage_max_tokens = deepcopy(stage_max_tokens) if isinstance(stage_max_tokens, dict) else {}
|
||||
stage_max_tokens["0"] = (
|
||||
|
||||
Reference in new issue
Block a user