Repository navigation
llamacpp adapter: the AIProviderAdapter impl moves to provider.rs, unchanged (S2b prep) - #6144
Merged
Merged
Conversation
…nged Serving S2b routes a resident's turn through the model's own chat handling (ChatRender, #6142): render with tools and reasoning, parse native tool calls. That work lands in generate_text, a 392-line body inside the 853-line adapter file, which would cross the 1,000-line rule. This is the move only: LlamaCppAdapter::generate in llamacpp_adapter/generate.rs (404 lines), the trait method delegates. No line of the body changes; llamacpp_adapter.rs is 463 lines. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…d (stringly_errors ratchet) f556a46 moved generate_text's body into an inherent LlamaCppAdapter::generate, which added a second Result<_, String> signature beside the trait's (stringly_errors 4245 -> 4246). The move is now the whole AIProviderAdapter impl into llamacpp_adapter/provider.rs, the way openai_adapter/provider.rs holds that adapter's: no new signature, generate.rs is gone. Verified byte-exact: provider.rs after its header equals canary's llamacpp_adapter.rs lines 188-853; llamacpp_adapter.rs equals lines 1-187 plus 'mod provider;'. 853 -> 188 + 673 lines. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply
added a commit
that referenced
this pull request
Nov 18, 2026
…o S2b slice 1 Git carried slice 1's edits through the generate.rs -> provider.rs rename: the chat render, parse and response fields now sit inside AIProviderAdapter::generate_text in provider.rs (704 lines). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…ames NO_TRAINED_CONTEXT by its crate path Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
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.
This prepares serving S2b, which routes a resident's turn through the model's own chat handling (
ChatRender, #6142). That work lands ingenerate_text, inside the 853-linellamacpp_adapter.rs, and would cross the 1,000-line rule. This PR is the move only, so S2b's diff stays reviewable.The whole
AIProviderAdapterimpl now lives inllamacpp_adapter/provider.rs, the wayopenai_adapter/provider.rsholds that adapter's. It adds no new signature.The first head, f556a46, moved only
generate_text's body into an inherentgenerate(). That added a secondResult<_, String>signature and failedstringly_errors(4245 → 4246), so the whole impl moves instead.Byte-exact move:
provider.rs, after its 7-line header (doc comment anduse super::*;), equals canary'sllamacpp_adapter.rslines 188-853.llamacpp_adapter.rsequals canary's lines 1-187, plusmod provider;.Measured
Not built locally: this machine serves, so CI is the first compile. No test changes.
🤖 Generated with Claude Code
https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo