-
Notifications
You must be signed in to change notification settings - Fork 120
ModelOption: design a comprehensive validation strategy #1148
Copy link
Copy link
Open
Labels
area/backendsProvider-specific work: Ollama, HF, LiteLLM, OpenAI, Bedrock, vLLMProvider-specific work: Ollama, HF, LiteLLM, OpenAI, Bedrock, vLLMenhancementNew feature or requestNew feature or requestneeds-designProblem is clear; implementation approach needs design discussion before work startsProblem is clear; implementation approach needs design discussion before work starts
Metadata
Metadata
Assignees
Labels
area/backendsProvider-specific work: Ollama, HF, LiteLLM, OpenAI, Bedrock, vLLMProvider-specific work: Ollama, HF, LiteLLM, OpenAI, Bedrock, vLLMenhancementNew feature or requestNew feature or requestneeds-designProblem is clear; implementation approach needs design discussion before work startsProblem is clear; implementation approach needs design discussion before work starts
Type
Fields
Give feedbackNo fields configured for issues without a type.
Context
Mellea's
ModelOptionsentinels (e.g.STOP_SEQUENCES,TEMPERATURE,MAX_NEW_TOKENS) are passed through to backends with no type or value validation. Today, an invalid value typically surfaces as a confusing backend-specific error (or silently misbehaves) far from the user's call site.This came up concretely in #1112:
STOP_SEQUENCESrequireslist[str]for uniform behavior across backends — a barestrworks on OpenAI/LiteLLM but breaks HuggingFace'sstop_strings. A per-optionvalidate_stop_sequenceshelper was prototyped there but pulled out, since validating one option in isolation creates inconsistency with the rest.What we want
We need a single, consistent strategy for validating
ModelOptionvalues.