VectifyAI/PageIndex · error · PageIndexAPIError

The model returned no response.

Error message

The model returned no response.

What it means

After driving the Anthropic tool runner to completion, run_messages found zero turns recorded — the model never produced any assistant response the library could return. This is a server/model-side anomaly rather than a caller input problem.

Source

Thrown at pageindex/local_chat.py:1109

    try:
        turns = [turn for turn in runner]
    except anthropic.AnthropicError as exc:
        raise _model_backend_error(exc, "messages", client) from exc
    except TypeError as exc:
        # the SDK's request-time credential-resolution failure
        if "authentication" not in str(exc).lower():
            raise
        raise PageIndexAPIError(
            "The Anthropic backend is not configured: set the "
            "ANTHROPIC_API_KEY environment variable, or pass an "
            f"api_key in chat_backend / backend. ({exc})") from exc
    finally:
        # safe here: the params read-back below does no HTTP
        if owns_transport:
            backend_client.close()
    if not turns:
        raise PageIndexAPIError("The model returned no response.")
    captured: dict = {}

    def capture(params):
        captured.update(params)
        return params

    runner.set_messages_params(capture)
    if not captured.get("messages"):
        # The conversation is read back through a mutator; if a vendor
        # change stops it delivering params, the envelope would silently
        # lose the tool turns — fail loudly instead.
        raise PageIndexAPIError(
            "Could not read the conversation back from the anthropic tool "
            "runner — the installed anthropic version is incompatible with "
            "this pageindex release."
        )
    conversation = list(captured["messages"])
    final = turns[-1]

View on GitHub (pinned to afb5e11976)

Solutions

  1. Retry the call — transient empty responses usually succeed on the next attempt
  2. Inspect the backend/model name in chat_backend for typos or an unreachable base_url
  3. If persistent, enable SDK-level logging to see the raw HTTP exchange
Defensive patterns

Strategy: retry

Try / catch

for attempt in range(3):
    try:
        return client.messages(prompt)
    except PageIndexAPIError as e:
        if 'no response' not in str(e) or attempt == 2:
            raise
        time.sleep(2 ** attempt)

Prevention

When it happens

Trigger: Calling client.messages(...) where the runner loop exits immediately without recording a turn (model returns an empty/aborted response, or an SDK edge case yields no events).

Common situations: A model outage or overloaded endpoint returning empty bodies; misconfigured backend pointing at a proxy that swallows responses; extremely rare vendor-side behavior.

Related errors


AI-assisted analysis of VectifyAI/PageIndex@afb5e11976 (2026-08-27). Data as JSON: /api/errors/72646675dbde4474. Report an issue: GitHub.