-
Notifications
You must be signed in to change notification settings - Fork 3k
Open
Description
Privileged issue
- I am a LangChain maintainer, or was asked directly by a LangChain maintainer to create an issue here.
Issue Content
ChatGoogleGenerativeAI should support labels parameter for cost tracking and traceability
Example Code
import { ChatGoogleGenerativeAI } from "@langchain/google-genai";
const model = new ChatGoogleGenerativeAI({
model: "gemini-2.0-flash",
labels: { env: "development" },
});Expected Behavior
The labels parameter should be accepted and passed through to sdk to tag LLM calls with metadata for cost aggregation and traceability purposes.
ChatVertexAI in @langchain/google-vertexai already supports a labels parameter for this purpose (added for cost aggregation and billing traceability).
For parity and to support users who need to track costs across different environments or applications, ChatGoogleGenerativeAI should also accept and forward the labels parameter to the underlying SDK.
Related
- Python equivalent issue/PR: feat(genai): add labels support langchain-google#1503
ChatVertexAIlabels implementation in@langchain/google-vertexai
Metadata
Metadata
Assignees
Labels
No labels