Skip to content

Fix KeyError in web_research: use 'content' key instead of 'full_content#15

Merged
rar-file merged 1 commit into
mainfrom
kaji/issue-12-7696
May 9, 2026
Merged

Fix KeyError in web_research: use 'content' key instead of 'full_content#15
rar-file merged 1 commit into
mainfrom
kaji/issue-12-7696

Conversation

@kaji-codes

@kaji-codes kaji-codes Bot commented May 9, 2026

Copy link
Copy Markdown
Contributor

Issue: core/ai_tools.web_research accessed page['full_content'], but AISearch.research populates fetched page dicts with key 'content'. This caused KeyError when web_research was invoked (and affected LangChain/OpenAI/Anthropic tool wrappers).

Fix: In core/ai_tools.py, replace references to page['full_content'] with page['content'] so the consumer matches the producer. Kept changes minimal and focused.

Tests: Ran test suite (11 passed).

If there's a reason to support both 'content' and 'full_content', we can add compatibility later, but current codebase consistently uses 'content' elsewhere.

Fixes #12

Opened by Kaji.

Issue: core/ai_tools.web_research accessed page['full_content'], but AISearch.research populates fetched page dicts with key 'content'. This caused KeyError when web_research was invoked (and affected LangChain/OpenAI/Anthropic tool wrappers).

Fix: In core/ai_tools.py, replace references to page['full_content'] with page['content'] so the consumer matches the producer. Kept changes minimal and focused.

Tests: Ran test suite (11 passed).

If there's a reason to support both 'content' and 'full_content', we can add compatibility later, but current codebase consistently uses 'content' elsewhere.

Generated by Kaji.
@rar-file rar-file merged commit 5103029 into main May 9, 2026
2 checks passed
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.

ai_tools.web_research raises KeyError: 'full_content' (mismatch with ai_search.research output)

1 participant