RFC: LLM backend and orchestration (ADR 0001)#335
Open
slobentanzer wants to merge 1 commit into
Open
Conversation
Collaborator
|
The decision should be made based on the intended use cases. LangChain and LangGraph are useful if we want more complex agent behavior. But even if complex looping and tool use won't be required, completely removing lang[things] will be a lot of work. Will see how much problem lang[things] cause. A better approach would be a gradual migration, starting by implementing new capabilities in a simplified way. |
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.
Adds
docs/decisions/0001-llm-backend-orchestration.md: a verified research synthesis to support a decision, not code.Question: should LangChain stay the load-bearing spine, or move to a thin OpenAI-compatible spine with LangChain at the edges?
Finding: all major local backends (vLLM, SGLang, llama.cpp, Ollama) expose OpenAI
/v1; LiteLLM (already a dependency) normalizes hosted and local providers; vLLM gives grammar-based structured outputs that are more reliable for local models than native tool calling. LangChain v1 is breaking work (langchain-classic split, agent API rename), which #334 is currently paying.Recommendation: route model calls through a thin spine (LiteLLM), use grammar-based structured outputs for local models, keep LangChain at the edges. Even if #334 lands as-is, wrap its LangChain usage behind a biochatter-owned interface so it can be demoted later. For #297: prefer the spine's normalized response over a bespoke return type.
Relates to #334 and #297. See the document for findings with confidence levels, open questions, and refuted claims.