fix(cli): change prerelease behavior (#6156)

respect users config, use uv defaults
This commit is contained in:
Isaac Francisco
2025-09-24 09:54:24 -07:00
committed by GitHub
parent c421afba65
commit d933d455ec
13 changed files with 204 additions and 43 deletions
@@ -1,7 +1,6 @@
from collections.abc import Sequence
from typing import Annotated, Literal, TypedDict
from langchain.chat_models import init_chat_model
from langchain_community.tools.tavily_search import TavilySearchResults
from langchain_core.messages import BaseMessage
from langchain_openai import ChatOpenAI
@@ -10,10 +9,8 @@ from langgraph.prebuilt import ToolNode
tools = [TavilySearchResults(max_results=1)]
model_anth = init_chat_model("claude-3-7-sonnet-20250219", model_provider="anthropic")
model_oai = ChatOpenAI(temperature=0)
model_anth = model_anth.bind_tools(tools)
model_oai = model_oai.bind_tools(tools)
@@ -35,10 +32,7 @@ def should_continue(state):
# Define the function that calls the model
def call_model(state, config):
if config["configurable"].get("model", "anthropic") == "anthropic":
model = model_anth
else:
model = model_oai
model = model_oai
messages = state["messages"]
response = model.invoke(messages)
# We return a list, because this will get added to the existing list