Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions lib/backend-common/src/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,24 @@ pub trait LLMEngine: Send + Sync + 'static {
Ok(Vec::new())
}

/// Validate an engine-control request before the Backend SDK applies any
/// discovery lifecycle policy. Implementations must not mutate engine
/// state. Override this for controls whose request fields can be rejected
/// before an `UnregisterBefore` transition.
fn validate_engine_control(
&self,
_control: &str,
_body: &serde_json::Value,
) -> Result<(), DynamoError> {
Ok(())
}

/// Handle one semantic engine-control request.
///
/// Wake/resume controls whose Backend SDK policy re-registers the serving
/// endpoint must return `is_sleeping: true` whenever the engine is not yet
/// serving-ready (for example, after a partial wake). A non-error response
/// without that field is treated as ready and allows endpoint registration.
async fn engine_control(
&self,
control: String,
Expand Down
Loading
Loading