Commit Graph

17 Commits

Author SHA1 Message Date
d328d801f4 fix: mock LLM clients in test_llm_factory to avoid API key requirement
- Add mock_chat_anthropic and mock_chat_deepseek fixtures to conftest.py
- Update test_llm_factory to use monkeypatch and mock fixtures
- Import ChatAnthropic and ChatDeepSeek in conftest.py for spec creation
- Tests now pass without requiring ANTHROPIC_API_KEY or DEEPSEEK_API_KEY
- Execution time reduced from failing after 0.12s to passing in 0.01s

This change allows factory tests to run in isolation without external
dependencies, making them consistent with the API test approach and
suitable for any development environment or CI/CD pipeline.
2026-06-10 16:16:14 -05:00
34053b3fc1 fix: use in-memory checkpointer for API tests to avoid database dependency
- Replace PostgreSQL AsyncPostgresSaver with MemorySaver in test fixtures
- Create test_app fixture with test_lifespan using in-memory dependencies
- Mock LLM model to avoid requiring API keys during tests
- Update test_api.py to use test_app fixture instead of production app
- Fix test_root endpoint URL to match root_path configuration
- All API tests now pass without requiring external services (0.06s vs 30s+ timeout)

This change allows tests to run in isolation without PostgreSQL or API keys,
making them faster and more reliable for CI/CD and local development.
2026-06-10 16:06:10 -05:00
7fa4d12e30 fix: test 2026-06-10 15:37:37 -05:00
30345538f7 fix: add MCP result validation, improve agent error handling and state management
- Add `_extract_mcp_content_text()` helper in naliia_tools.py to safely
  extract text from MCP results, preventing IndexError on empty content
- Replace all direct `result.content[0].text` accesses with safe helper
- Improve customer identification with preservation of existing state
- Add proper JSON parsing with fallback and error handling
- Simplify webhook state management (use agent's checkpointer internally)
- Update system prompt to remove check_mcp_connection tool reference
- Fix tests to use async mocks and correct expected values
2026-03-19 21:11:28 -05:00
e9b8b21807 revert: re-enable identify_customer node in agent graph
- Move test.ipynb to tests/notebooks for RPC testing
2026-03-18 22:38:05 -05:00
ea3da00b95 fix: use TestClient as context manager to trigger lifespan 2026-03-18 15:05:01 -05:00
6fc6338413 fix: PEP8 Style 2026-03-04 16:20:56 -05:00
da2c2a1528 feat: Implement MemorySaver 2026-02-27 00:47:16 -05:00
42dc2099d2 feat: Add chat webhook 2026-02-24 23:13:09 -05:00
b76838ecba chore: fix tests 2026-02-24 23:12:46 -05:00
1b5303b44f fix: unnecesary tests 2026-02-24 23:11:04 -05:00
d059830d3d chore: fix tests 2026-02-17 13:40:10 -05:00
e28c42ddd8 feat: Implemented Registry Pattern 2026-02-15 15:58:21 -05:00
adda2a3e5e feat: Add NaliiaBot API 2026-02-09 15:59:54 -05:00
ec02b6ff62 feat: Add complete suit test 2026-02-03 22:11:01 -05:00
aff0a588c5 firts agent concept 2026-02-03 21:20:00 -05:00
daa9893d2e first commit 2026-01-21 23:06:51 -05:00