Set up
Configure ChatOpenAI
Point
ChatOpenAI at the Valar base URL and pass your key. Set model to a Valar model ID.Stream responses
Use.stream(...) to receive the response in chunks as they are generated.
Tool calling
Attach tools with.bind_tools([...]). LangChain emits the OpenAI tool-calling format that Valar supports, and any tool calls the model makes come back on the response’s tool_calls.
To choose a completion window, pass it as request metadata through See Completion windows and Inference modes for details.
model_kwargs. The two windows are Now (asap) and Standard (standard):