From dd787e1df7e23a335b41303ec2f0a728fe11e875 Mon Sep 17 00:00:00 2001 From: Clement Bouvet Date: Mon, 26 Jan 2026 12:00:42 +0100 Subject: [PATCH] feat: add optional tags field to completion requests Add support for tagging requests with custom string labels for better request categorization and tracking in the AI gateway. Co-Authored-By: Claude Opus 4.5 --- src/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/index.ts b/src/index.ts index 0df5b68..dc060e8 100644 --- a/src/index.ts +++ b/src/index.ts @@ -42,6 +42,7 @@ export interface InputObject { messages: Message[]; tools?: Tool[]; tool_choice?: ToolChoice; + tags?: string[]; } export interface SendOptions { @@ -185,6 +186,7 @@ export default class Edgee { if (typeof input !== "string") { if (input.tools) body.tools = input.tools; if (input.tool_choice) body.tool_choice = input.tool_choice; + if (input.tags) body.tags = input.tags; } const res = await fetch(`${this.baseUrl}/v1/chat/completions`, { @@ -285,6 +287,7 @@ export default class Edgee { if (typeof input !== "string") { if (input.tools) body.tools = input.tools; if (input.tool_choice) body.tool_choice = input.tool_choice; + if (input.tags) body.tags = input.tags; } yield* this._handleStreamingResponse(