DefaultRequestTransformer
Default implementation that uses ModelRegistry for capability lookups.
Value parameters
- overrides
-
Optional map of model-specific capability overrides
Attributes
- Graph
-
- Supertypes
Members list
Value members
Concrete methods
Get the set of parameters that are not supported by this model.
Get the set of parameters that are not supported by this model.
Value parameters
- modelId
-
The model identifier
Attributes
- Returns
-
Set of disallowed parameter names, empty if all are allowed
- Definition Classes
Check if streaming needs to be faked for this model.
Check if streaming needs to be faked for this model.
Some models (like O1) don't support native streaming and require the client to simulate streaming by returning the full response as a single chunk.
Value parameters
- modelId
-
The model identifier
Attributes
- Returns
-
true if the model requires fake streaming
- Definition Classes
Transform messages for model-specific requirements.
Transform messages for model-specific requirements.
For example, O-series models that don't support system messages will have their system messages converted to user messages with a "[System]:" prefix.
Value parameters
- messages
-
The messages to transform
- modelId
-
The model identifier
Attributes
- Returns
-
Transformed messages
- Definition Classes
Validate and transform completion options for a specific model.
Validate and transform completion options for a specific model.
Checks model capabilities and either drops unsupported parameters or returns validation errors, depending on the dropUnsupported flag.
Value parameters
- dropUnsupported
-
If true, silently drop/adjust unsupported params; if false, return error
- modelId
-
The model identifier (e.g., "o1", "gpt-4o", "claude-3-7-sonnet")
- options
-
The completion options to transform
Attributes
- Returns
-
Transformed options or validation error
- Definition Classes