The first result said 400. The second result was the same. Then everything clicked.
If you are wiring FileFortress AI search to a local OpenAI-compatible runtime (like Foundry), the fastest path to success is understanding the difference between:
- Provider/setup failures (endpoint, model, compatibility)
- Prompt intent failures (query does not map to search filters)
A model name that looks right but does not exist on the configured endpoint. The request can be valid JSON and still fail with 400.
Lesson 1: Model IDs Must Match Exactly
In many local runtimes, model IDs include backend/runtime suffixes. A generic model alias can fail.
# Looks plausible, may fail
model = phi-4
# Exact endpoint model ID, works
model = phi-4-openvino-gpu:1
That single difference can convert repeated 400 responses into successful translations.
Lesson 2: Empty-Body 400 Does Not Mean \"No Clue\"
Some providers return 400 with no response body. It still usually points to one of these:
- Model not available on endpoint
- Unsupported request parameter
- Endpoint/path mismatch
A practical checklist:
- Confirm endpoint health (
foundry service status). - Confirm model IDs from
/v1/models. - Set exact model with
tools configure foundry --model .... - Re-test prompt with
--dry-run --explain.
Lesson 3: Some Queries Are Not Search Queries
Once model setup was fixed, one prompt still failed:
\"How many remotes do i have?\"
That is a valid product question, but not a file-filter request. The AI command is focused on mapping prompts to search criteria, so it correctly returned \"no filters extracted\".
- Use
aifor file-search intent. - Use
remotes listfor remote inventory and count.
Lesson 4: Dry-Run and Explain Are Your Fastest Debug Tools
These options turn debugging from guesswork into a deterministic loop:
# Validate interpretation only
filefortress ai "find images smaller than 5kb" --dry-run
# Inspect reasoning
filefortress ai "find images smaller than 5kb" --dry-run --explain
Once interpretation looks correct, execute without dry-run.
A Repeatable Recovery Workflow
- Fix provider correctness (endpoint + exact model ID).
- Validate with small, obvious prompt.
- Use dry-run + explain for each new prompt shape.
- Switch to explicit
searchflags when determinism is required.
Related Resources
Turn AI Errors Into Fast Iteration
Diagnose model issues quickly, validate prompt mapping with dry-run, and keep search behavior predictable.