Migrate to PydanticAI for LLM and summary agents#59
Merged
Conversation
Replaces direct OpenAI SDK usage with PydanticAI Agent, enabling configurable LLM providers (OpenAI, Anthropic) via a provider:model string format. Renames openai_api_key → embeddings_api_key, adds explicit llm_api_key and llm_model config fields. Adds structured SummaryOutput type and tests for ConversationEngine and KnowledgeManager. Closes #58
- Install requirements-dev.txt to get pytest-asyncio - Explicitly install pydantic-ai>=1.0.0 with -U to upgrade opentelemetry packages past the version pinned by chromadb
Missing '; python_version >= "3.13"' marker caused CI failure on Python 3.10.
chromadb pins opentelemetry-exporter-otlp-proto-common==1.32.0 which lacks _create_exp_backoff_generator required by pydantic-ai.
…r otel packages grpc 1.32.0 imports _create_exp_backoff_generator from proto-common but that function only exists in newer versions. Must upgrade all otel packages together. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…lemetry Pin pydantic-ai>=1.0.0 in requirements.in and recompile both requirements files so opentelemetry packages are consistently at 1.39.1 — compatible with both chromadb and pydantic-ai/logfire. Removes the version-upgrade workaround from the CI workflow.
numpy 2.4.x and other dependencies require Python >=3.11.
langchain 1.x removed langchain.vectorstores.base, langchain.embeddings.base, and langchain.text_splitter — updating those imports is a separate task.
Bump requires-python to >=3.13 to match dev/CI environment. Populate dependencies to mirror requirements.in so pip install -e . works correctly.
wolfdancer
added a commit
that referenced
this pull request
Jun 17, 2026
Reconcile the Slack bot with the PydanticAI migration (#59): - SlackBotConfig: replace openai_api_key with embeddings_api_key / llm_api_key / llm_model, matching DiscordBotConfig (read by Innie/Topic). - slack_bot.py: Innie() now takes only outie_config (no api_key arg). - Add slack-bolt to pyproject dependencies (was only in requirements). - Update slack_config.example.yaml and Slack tests for the new fields. - Reconcile CLAUDE.md to cover both platforms and the PydanticAI engine. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Agent, enabling configurable LLM providers (OpenAI, Anthropic) viaprovider:modelstring format (e.g."anthropic:claude-sonnet-4-6")openai_api_key→embeddings_api_key, adds explicitllm_api_keyandllm_modelconfig fields so embeddings and chat LLM can be configured independentlySummaryOutputPydantic model for knowledge manager summaries, withsummary,key_points, andsuggested_titlefieldstests/test_conversation_engine.pyandtests/test_knowledge_manager.pyusing PydanticAI'sTestModelfor fast, dependency-free testingTest plan
pytestpasses all tests including new async tests forConversationEngineandKnowledgeManagerllm_model: "openai:gpt-4o")llm_model: "anthropic:claude-sonnet-4-6")config.yamlupdated to new field names (embeddings_api_key,llm_api_key,llm_model)Closes #58