Skip to content

chore: LLM minimum acceptance tests with CI-managed model matrix#1445

Merged
nicoloboschi merged 3 commits intomainfrom
chore/llm-acceptance-tests
May 5, 2026
Merged

chore: LLM minimum acceptance tests with CI-managed model matrix#1445
nicoloboschi merged 3 commits intomainfrom
chore/llm-acceptance-tests

Conversation

@nicoloboschi
Copy link
Copy Markdown
Collaborator

Summary

  • Rewrite test_llm_provider.py to read provider/model from LLM_TEST_PROVIDER / LLM_TEST_MODEL env vars instead of a Python-level MODEL_MATRIX with pytest.mark.parametrize
  • Mark the file with pytest.mark.llm so test-api excludes it via -m "not llm"
  • Add test-llm-acceptance.yml workflow with a CI matrix of 14 provider/model combinations (VertexAI, OpenAI, Anthropic, Groq, DeepSeek, Gemini, Bedrock)
  • Workflow triggers: daily cron (06:30 UTC), manual dispatch, or llm-tests PR label

Adding/removing models to test is a one-line YAML change in the matrix — no Python changes needed.

Test plan

  • pytest --collect-only -m "not llm" deselects all 3 LLM tests
  • pytest --collect-only tests/test_llm_provider.py collects 3 tests
  • Tests skip cleanly when LLM_TEST_PROVIDER/LLM_TEST_MODEL are not set
  • Lint passes
  • CI test-api should pass (LLM tests excluded)
  • Add llm-tests label to this PR to validate the new workflow

… matrix

Move LLM provider/model selection from Python-level pytest.mark.parametrize
to a GitHub Actions matrix. Each provider/model combo runs as a separate CI
job for clear per-model failure visibility.

- Rewrite test_llm_provider.py to read LLM_TEST_PROVIDER/LLM_TEST_MODEL
  from env vars instead of hardcoded MODEL_MATRIX
- Mark with pytest.mark.llm, excluded from test-api via -m "not llm"
- Add test-llm-acceptance.yml workflow (daily cron, manual, or 'llm-tests' label)
  with matrix of 14 provider/model combinations
Replace the Python-level MODEL_MATRIX in test_llm_provider.py with a
CI-managed matrix job (test-api-llm-acceptance) in test.yml.

- Add hs_llm_mat pytest marker for tests that should run across LLM providers
- Tag 6 tests across 5 files covering all core operations:
  - test_llm_provider.py: API methods + memory operations (fact extraction, reflect)
  - test_retain.py: test_retain_with_chunks (multi-paragraph retain)
  - test_fact_extraction_quality.py: test_comprehensive_multi_dimension
  - test_reflections.py: test_reflect_searches_mental_models_when_available
  - test_consolidation.py: test_consolidation_merges_only_redundant_facts
- test-api excludes hs_llm_mat tests via -m "not hs_llm_mat"
- New test-api-llm-acceptance job runs only -m "hs_llm_mat" with matrix:
  vertexai (gemini-2.5-flash, gemini-2.5-flash-lite), openai (gpt-4.1-mini),
  anthropic (claude-sonnet-4, claude-haiku-4), deepseek (deepseek-chat)
Matrix: vertexai/gemini-2.5-flash-lite, gemini/gemini-2.5-flash-lite,
openai/gpt-4.1-nano, groq/openai-gpt-oss-20b, bedrock/nova-2-lite.
Set HINDSIGHT_API_LLM_API_KEY from matrix-provided secret name.
@nicoloboschi nicoloboschi merged commit e06bbf6 into main May 5, 2026
63 of 68 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.

1 participant