Skip to content

Modernizing bundled configs#1251

Merged
jamesbraza merged 2 commits intomainfrom
invalid-configs
Dec 22, 2025
Merged

Modernizing bundled configs#1251
jamesbraza merged 2 commits intomainfrom
invalid-configs

Conversation

@jamesbraza
Copy link
Copy Markdown
Collaborator

#1054 missed updating the bundled configs. This PR:

  1. Adds a test that bundled configs load
  2. Modernizes configs as needed

Closes #1250

@jamesbraza jamesbraza self-assigned this Dec 22, 2025
Copilot AI review requested due to automatic review settings December 22, 2025 14:45
@jamesbraza jamesbraza added the bug Something isn't working label Dec 22, 2025
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Dec 22, 2025
@dosubot
Copy link
Copy Markdown

dosubot bot commented Dec 22, 2025

Related Documentation

Checked 1 published document(s) in 1 knowledge base(s). No updates required.

How did I do? Any feedback?  Join Discord

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR modernizes bundled configuration files to align with the new parsing settings structure introduced in PR #1054, and adds a test to ensure all bundled configs can be loaded successfully.

Key Changes:

  • Adds a test that validates all bundled JSON configs can be loaded via get_settings()
  • Migrates parsing configuration from old flat structure (chunk_size, overlap) to new nested structure (reader_config.chunk_chars, reader_config.overlap)
  • Removes deprecated chunking_algorithm field from configs

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/test_configs.py Adds test to validate all bundled configs load successfully using subtests for each config file
src/paperqa/configs/wikicrow.json Modernizes parsing config: moves chunk_size/overlap to reader_config dict, removes chunking_algorithm
src/paperqa/configs/tier5_limits.json Modernizes parsing config: moves chunk_size/overlap to reader_config dict
src/paperqa/configs/tier4_limits.json Modernizes parsing config: moves chunk_size/overlap to reader_config dict
src/paperqa/configs/tier3_limits.json Modernizes parsing config: moves chunk_size/overlap to reader_config dict
src/paperqa/configs/tier2_limits.json Modernizes parsing config: moves chunk_size/overlap to reader_config dict
src/paperqa/configs/search_only_clinical_trials.json Modernizes parsing config: moves chunk_size/overlap to reader_config dict
src/paperqa/configs/openreview.json Modernizes parsing config: moves chunk_size to reader_config.chunk_chars
src/paperqa/configs/high_quality.json Modernizes parsing config: moves chunk_size/overlap to reader_config dict
src/paperqa/configs/contracrow.json Modernizes parsing config: moves chunk_size/overlap to reader_config dict, removes chunking_algorithm
src/paperqa/configs/clinical_trials.json Modernizes parsing config: moves chunk_size/overlap to reader_config dict

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Dec 22, 2025
@jamesbraza jamesbraza merged commit 9a25b49 into main Dec 22, 2025
11 of 13 checks passed
@jamesbraza jamesbraza deleted the invalid-configs branch December 22, 2025 15:58
@kirillkoncha
Copy link
Copy Markdown

Hi! Thank you for fixes, now importing filename from config name works fine. However, another issue is raised, when I am trying to set myself a custom config. For example:

from paperqa.settings import (
    AgentSettings,
    AnswerSettings,
    IndexSettings,
    ParsingSettings,
    PromptSettings,
    Settings,
)
settings=Settings(
    AnswerSettings(
        evidence_k=10,
        evidence_detailed_citations=True,
        evidence_retrieval=True,
        evidence_summary_length="about 100 words",
        evidence_skip_summary=False,
        answer_max_sources=5,
        max_answer_attempts=None,
        answer_length="must not exceed 1000 words, but sometimes can be longer",
        max_concurrent_requests=10,
    )
)

Raises this pydantic error:

ValidationError: 1 validation error for AnswerSettings
evidence_detailed_citations
  Extra inputs are not permitted [type=extra_forbidden, input_value=True, input_type=bool]
    For further information visit https://errors.pydantic.dev/2.12/v/extra_forbidden

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

Labels

bug Something isn't working enhancement New feature or request lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pydantic validation Error - running in colab

4 participants