invoke-ai/InvokeAI · warning · HTTPException
The 'strict' and 'append' query parameters are mutually excl
Error message
The 'strict' and 'append' query parameters are mutually exclusive
What it means
HTTP 400 raised by update_recall_parameters when both the 'strict' and 'append' query parameters are truthy. strict means 'set exactly these parameters, clearing everything else'; append means 'add to what's already set' — the two modes are contradictory, so the endpoint rejects the combination.
Source
Thrown at invokeai/app/api/routers/recall_parameters.py:454
exclusive with ``strict`` (which clears omitted parameters).
Returns:
A dictionary containing the updated parameters and status
Example:
POST /api/v1/recall/{queue_id}?strict=true
{
"positive_prompt": "a beautiful landscape",
"model": "sd-1.5",
"steps": 20
}
# In strict mode, all other parameters (reference_images, loras, etc.)
# are cleared. In non-strict mode (default) they would be left as-is.
"""
logger = ApiDependencies.invoker.services.logger
if strict and append:
raise HTTPException(
status_code=400,
detail="The 'strict' and 'append' query parameters are mutually exclusive",
)
# Validate image access before processing — prevents information leakage
# (dimensions) and derived-image minting via ControlNet preprocessors.
_assert_recall_image_access(parameters, current_user)
assert_image_move_maintenance_inactive()
try:
# In strict mode, include all parameters so the frontend clears anything
# not explicitly provided. List-typed fields use [] instead of None so
# the frontend sees an empty collection rather than a null it might skip.
if strict:
_list_fields = {
name for name, field in RecallParameter.model_fields.items() if "list" in str(field.annotation).lower()
}
provided_params = {View on GitHub (pinned to 0b6a024f2f)
Solutions
- Send at most one of strict/append as true — typically strict=true for 'replace' semantics and omit append
- Fix the client to make the two flags mutually exclusive (radio buttons / single mode enum)
- If you want replace semantics, drop append; for additive updates, drop strict
Example fix
// before
const qs = `strict=${strict}&append=${append}`;
// after
const mode = strict ? 'strict=true' : append ? 'append=true' : '';
const qs = mode; // never both Defensive patterns
Strategy: validation
Validate before calling
if (strict && append) {
throw new Error('strict and append are mutually exclusive');
} Type guard
type RecallMode = { strict: true; append?: false } | { strict?: false; append: true } | {};
function buildRecallQuery(mode: RecallMode): string {
if ('strict' in mode && mode.strict && 'append' in mode && mode.append) throw new Error('exclusive flags');
return mode.strict ? 'strict=true' : mode.append ? 'append=true' : '';
} Try / catch
try {
await api.recallParameters(queueId, params, { strict, append });
} catch (e) {
if (e.status === 400 && /mutually exclusive/.test(e.body?.detail ?? '')) {
// retry with strict only
await api.recallParameters(queueId, params, { strict: true });
} else throw e;
} Prevention
- Model the mode as a single enum (replace|append) rather than two booleans
- Use radio buttons/exclusive toggles in UIs for these flags
- Sanitize dynamically built query strings so defaults never set both flags
When it happens
Trigger: POST /api/v1/recall_parameters/{queue_id}?strict=true&append=true (or both flags set) — a client bug combining mode flags, or a UI checkbox pair that allows both to be ticked.
Common situations: Building the query string dynamically and defaulting both flags to true; merging two feature toggles without exclusivity validation in the UI.
Related errors
- No external provider config fields provided
- str(e)
- str(e) (ValueError from user service update, e.g. LastAdmini
- Current password is required to set a new password
- Invalid request: Must provide either 'all' or both 'offset'
AI-assisted analysis of invoke-ai/InvokeAI@0b6a024f2f (2026-08-29).
Data as JSON: /api/errors/487e8971049efd2f.
Report an issue: GitHub.