invoke-ai/InvokeAI · warning · NotAMatchError
external API models are not probed from disk
Error message
external API models are not probed from disk
What it means
External API model configs (models served by remote providers, identified by provider_id + provider_model_id) are created from API listings, never probed from files on disk. Their from_model_on_disk therefore unconditionally raises NotAMatchError. This is expected behavior: a file probe should never resolve to an ExternalApiModelConfig.
Source
Thrown at invokeai/backend/model_manager/configs/external_api.py:113
source: str = Field(default="")
hash: str = Field(default="")
file_size: int = Field(default=0, ge=0)
model_config = ConfigDict(extra="forbid")
@model_validator(mode="after")
def _populate_external_fields(self) -> "ExternalApiModelConfig":
if not self.path:
self.path = f"external://{self.provider_id}/{self.provider_model_id}"
if not self.source:
self.source = self.path
if not self.hash:
self.hash = f"external:{self.provider_id}:{self.provider_model_id}"
return self
@classmethod
def from_model_on_disk(cls, mod: ModelOnDisk, override_fields: dict[str, object]) -> Self:
raise NotAMatchError("external API models are not probed from disk")
View on GitHub (pinned to 0b6a024f2f)
Solutions
- Do not include external API configs in disk-probe candidate lists; create them via the provider API sync instead
- Instantiate external API models directly with provider_id and provider_model_id (hash auto-generated as external:<provider>:<model>)
- Catch NotAMatchError in probe loops and continue to the next config class — this raise is the intended 'not applicable' signal
- File a bug if InvokeAI's own installer routes local files to the external-API config
Example fix
// before cfg = ExternalApiModelConfig.from_model_on_disk(mod, override_fields) // after cfg = ExternalApiModelConfig(provider_id="openai", provider_model_id="gpt-image-1")
Defensive patterns
Strategy: try-catch
Validate before calling
from invokeai.backend.model_manager.configs.external_api import ExternalApiModelConfig
def should_probe_on_disk(cls) -> bool:
return not issubclass(cls, ExternalApiModelConfig) Try / catch
try:
config = cls.from_model_on_disk(mod, override_fields)
except NotAMatchError:
continue # expected for external API configs in a probe loop Prevention
- Exclude external API config classes from disk-probe candidate lists
- Create external API models via provider sync APIs, not file probing
- Treat NotAMatchError as a normal probe rejection, not a bug
- Verify model sources before writing custom install pipelines
When it happens
Trigger: Model-manager probe/install flow iterating config classes and calling from_model_on_disk on a file, reaching the external-API config class; custom code explicitly calling ExternalApiModelConfig.from_model_on_disk with a ModelOnDisk.
Common situations: Writing a custom model-install routine that probes all config subclasses against local files; a bug in registration order causing external API configs to be consulted during disk probing.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- External API models cannot be loaded from disk
- Model config discriminator value must be computed from a dic
- The model with key {key} is not a main SD 1/2/XL checkpoint
- Model '{body.model_key}' not found
- Unsupported control_lllite type: {type(control_lllite)}
AI-assisted analysis of invoke-ai/InvokeAI@0b6a024f2f (2026-08-29).
Data as JSON: /api/errors/45d5100985f72240.
Report an issue: GitHub.