feat: implement summarization step via Model Gateway (#48) #146

Merged
shahondin1624 merged 1 commits from feature/issue-48-summarization into main 2026-03-10 15:41:35 +01:00

Summary

  • Add Summarizer class that calls Model Gateway Inference gRPC endpoint to produce query-relevant summaries of web page content
  • Includes parallel summarization via summarize_many() with configurable concurrency limits
  • Graceful degradation: falls back to truncated raw content if Model Gateway is unavailable
  • Configurable max summary length and task complexity

Test plan

  • 13 tests passing (mock gRPC server approach)
  • Success path with correct params forwarding
  • Long response truncation
  • Graceful degradation on gateway unavailability (short and long content)
  • Parallel summarization and concurrency limits
  • Empty list edge case
  • Prompt template verification
  • _truncate helper unit tests
  • Ruff lint clean
  • All 49 search service tests passing

Closes #48

🤖 Generated with Claude Code

## Summary - Add `Summarizer` class that calls Model Gateway `Inference` gRPC endpoint to produce query-relevant summaries of web page content - Includes parallel summarization via `summarize_many()` with configurable concurrency limits - Graceful degradation: falls back to truncated raw content if Model Gateway is unavailable - Configurable max summary length and task complexity ## Test plan - [x] 13 tests passing (mock gRPC server approach) - [x] Success path with correct params forwarding - [x] Long response truncation - [x] Graceful degradation on gateway unavailability (short and long content) - [x] Parallel summarization and concurrency limits - [x] Empty list edge case - [x] Prompt template verification - [x] `_truncate` helper unit tests - [x] Ruff lint clean - [x] All 49 search service tests passing Closes #48 🤖 Generated with [Claude Code](https://claude.com/claude-code)
shahondin1624 added 1 commit 2026-03-10 15:41:30 +01:00
Add Summarizer class that calls Model Gateway Inference gRPC endpoint
to produce query-relevant summaries of web page content. Includes
parallel summarization, configurable max length, and graceful
degradation (falls back to truncated raw content if gateway unavailable).

13 tests covering success, params, truncation, degradation, parallel,
concurrency limits, empty list, and prompt template verification.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
shahondin1624 merged commit 578a5e9651 into main 2026-03-10 15:41:35 +01:00
shahondin1624 deleted branch feature/issue-48-summarization 2026-03-10 15:41:36 +01:00
Sign in to join this conversation.