Skip to content

refactor(llm): split claude.rs (5,206 lines) into submodules #1965

@bug-ops

Description

@bug-ops

Summary

Split crates/zeph-llm/src/claude.rs (5,206 lines) into dedicated submodules.

Target structure

claude/
  mod.rs       — ClaudeProvider struct, trait impl, public API (~1200 lines)
  request.rs   — request building, system block splitting, message conversion (~1500 lines)
  response.rs  — response parsing, SSE, thinking block handling (~1000 lines)
  cache.rs     — prompt cache utilities, block markers (~500 lines)
  tests.rs     — unit tests extracted from mod.rs (~1000 lines)

Acceptance criteria

  • No file exceeds 2,000 lines
  • All existing tests pass unchanged
  • LLM serialization gate: live Claude API session with tool use and cache hits, no 400/422 errors

Part of EPIC-04

Metadata

Metadata

Assignees

No one assigned

    Labels

    llmzeph-llm crate (Ollama, Claude)refactorCode refactoring without functional changes

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions