Skip to content

Bug: Invalid default value in config.yaml causes runtime error #328

Description

@Chirag254-isymply

Description

The default configuration in pageindex/config.yaml sets retrieve_model to gpt-5.4, which is not a valid OpenAI model name. This causes a runtime error for any user relying on the default config when retrieve_model is used.

Affected File

pageindex/config.yaml — line 3

retrieve_model: "gpt-5.4"  # ← this model does not exist

Steps to Reproduce

  1. Clone the repo and install dependencies
  2. Set a valid OPENAI_API_KEY
  3. Run PageIndexClient without overriding retrieve_model
  4. Any call that routes through the retrieve model will fail with a model-not-found error from the LiteLLM/OpenAI API

Expected Behaviour

The default retrieve_model should be a valid, existing model name (e.g. gpt-4o or gpt-4.1), or should fall back to the value of model when not explicitly set.

Actual Behaviour

LiteLLM / OpenAI API returns an error because gpt-5.4 is not a recognised model identifier.

Proposed Fix

Update config.yaml to use a valid model name:

retrieve_model: "gpt-4o"   # or remove the key and fall back to `model`

Alternatively, the ConfigLoader or PageIndexClient.__init__ could be updated to fall back to model when retrieve_model is None or invalid, which is actually already partially handled in client.py:

self.retrieve_model = _normalize_retrieve_model(opt.retrieve_model or self.model)

So simply removing retrieve_model from config.yaml (making it None by default) would also fix this cleanly.

Environment

  • Affects all users using the default config
  • No special environment required to reproduce

I would like to work on this fix if the maintainers are open to it. Happy to submit a PR once this issue is confirmed. 🙂

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions