fix(chat): expose typed request validation errors by BukeLy · Pull Request #578 · VectifyAI/PageIndex · GitHub
Skip to content

fix(chat): expose typed request validation errors - #578

Open
BukeLy wants to merge 6 commits into
mainfrom
fix/chat-validation-errors
Open

BukeLy wants to merge 6 commits into
mainfrom
fix/chat-validation-errors

Conversation

@BukeLy

@BukeLy BukeLy commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Summary

Expose PageIndexValidationError, a subclass of PageIndexAPIError, so chat callers can distinguish local request validation from execution failures by type.

Closes #562.

Goal

Use the same error contract across the answer lane, Chat Completions, Responses, and Messages.

What Changed

  • Raise the subclass at local chat validation points, including message containers, model/backend overrides, targeting, and SDK-merged reasoning fields. Validate Messages inputs before loading the optional provider SDK.
  • Preserve execution errors and their status/cause; extend the existing tests to verify the distinction during calls and stream consumption.
  • Document exception handling and which error details callers may display.

Validation: LITELLM_LOCAL_MODEL_COST_MAP=True .venv/bin/python -m pytest -q --disable-warnings — 1166 passed, 7 skipped on Python 3.12 with agent frameworks installed. git diff --check passed.

Key Files

  • pageindex/errors.py, pageindex/__init__.py: define and export the public validation exception.
  • pageindex/client.py, pageindex/local_chat.py, pageindex/agent_tools.py: classify SDK chat argument validation.
  • tests/test_local_chat.py: exercise the public classification contract and execution diagnostics.
  • README.md: explain error handling and user-visible diagnostics.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 353638edf4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread pageindex/client.py
Comment thread pageindex/agent_tools.py Outdated
Comment thread pageindex/local_chat.py
Comment thread pageindex/client.py
Comment thread pageindex/local_chat.py
Comment thread pageindex/client.py Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: be53bc4190

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread pageindex/agent_tools.py
Comment thread pageindex/local_chat.py
Comment thread pageindex/client.py

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cf91f91087

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread pageindex/client.py
Comment thread pageindex/local_chat.py

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose typed chat request validation errors separately from execution failures

1 participant