{"_id":"merge-gateway-ai-sdk-provider","_rev":"4-7d892a03fb66a344d5bd86ab66f3ca4b","name":"merge-gateway-ai-sdk-provider","dist-tags":{"latest":"0.3.0"},"versions":{"0.1.0":{"name":"merge-gateway-ai-sdk-provider","version":"0.1.0","keywords":["merge","gateway","ai","ai-sdk","vercel","llm","openai","anthropic","provider"],"author":{"name":"Merge","email":"support@merge.dev"},"license":"MIT","_id":"merge-gateway-ai-sdk-provider@0.1.0","maintainers":[{"name":"aakash.gupte","email":"aakash.gupte@merge.dev"}],"homepage":"https://github.com/merge-api/merge-gateway-ai-sdk-provider","bugs":{"url":"https://github.com/merge-api/merge-gateway-ai-sdk-provider/issues"},"dist":{"shasum":"2569fe879dbadb2e173f9a397cb73b1c59b33d93","tarball":"https://registry.npmjs.org/merge-gateway-ai-sdk-provider/-/merge-gateway-ai-sdk-provider-0.1.0.tgz","fileCount":9,"integrity":"sha512-ax7O4fzrKpazICd5/uR6QZkOjxqxY86UckosPQbHY1ajSb3A1UJhASdGcWEOAIaa20HBDNuUEK21GaZlRhr6uQ==","signatures":[{"sig":"MEUCIG6s+mj6uNz/3AHpW9WynZZj4SVznKGaU7SRMJwayv5ZAiEAs44o8ea2We1T5acVMQ4NNQLdspgr6RpH2qwTMfwzjbg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":2930748},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"c852755800bfc29af3b6f959f6d2a257d80c437d","scripts":{"test":"vitest run","build":"tsup","test:watch":"vitest","prepublishOnly":"npm run build"},"_npmUser":{"name":"aakash.gupte","email":"aakash.gupte@merge.dev"},"repository":{"url":"git+https://github.com/merge-api/merge-gateway-ai-sdk-provider.git","type":"git"},"_npmVersion":"10.8.2","description":"Merge Gateway provider for the Vercel AI SDK","directories":{},"_nodeVersion":"18.20.8","_hasShrinkwrap":false,"devDependencies":{"ai":"6.0.157","zod":"4.3.6","tsup":"8.5.1","vitest":"3.0.0","typescript":"~5.7.0","@ai-sdk/provider":"3.0.8","@ai-sdk/provider-utils":"4.0.23"},"peerDependencies":{"@ai-sdk/provider":">=3.0.0","@ai-sdk/provider-utils":">=4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/merge-gateway-ai-sdk-provider_0.1.0_1775847283696_0.8791553721400613","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"merge-gateway-ai-sdk-provider","version":"0.1.1","keywords":["merge","gateway","ai","ai-sdk","vercel","llm","openai","anthropic","provider"],"author":{"name":"Merge","email":"support@merge.dev"},"license":"MIT","_id":"merge-gateway-ai-sdk-provider@0.1.1","maintainers":[{"name":"aakash.gupte","email":"aakash.gupte@merge.dev"}],"homepage":"https://github.com/merge-api/merge-gateway-ai-sdk-provider","bugs":{"url":"https://github.com/merge-api/merge-gateway-ai-sdk-provider/issues"},"dist":{"shasum":"8ec0f97a9daffaf229a27250a33003ba1b3ba993","tarball":"https://registry.npmjs.org/merge-gateway-ai-sdk-provider/-/merge-gateway-ai-sdk-provider-0.1.1.tgz","fileCount":9,"integrity":"sha512-y8zYkZOeI0uFj2iwCQHoNCYXibnENo5//uPtAPEhfu4LuPIU+WV/msnDIpIbxa47K1Nday2QnhkR3jFD0PJk6A==","signatures":[{"sig":"MEYCIQD1balOPFLmBm1gVf13Ck9+5O6RBWBVlyt8Dz96CQYz/QIhAK2e0E2smo3/J3Itj5F/6ZauXTwpNN8QxFjk40qDUPYj","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":2939164},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"8173b6e4425a0b81fc293bd2f6c983898e873bc9","scripts":{"test":"vitest run","build":"tsup","test:watch":"vitest","prepublishOnly":"npm run build"},"_npmUser":{"name":"aakash.gupte","email":"aakash.gupte@merge.dev"},"repository":{"url":"git+https://github.com/merge-api/merge-gateway-ai-sdk-provider.git","type":"git"},"_npmVersion":"10.9.4","description":"Merge Gateway provider for the Vercel AI SDK","directories":{},"_nodeVersion":"22.22.1","_hasShrinkwrap":false,"devDependencies":{"ai":"6.0.157","zod":"4.3.6","tsup":"8.5.1","vitest":"3.0.0","typescript":"~5.7.0","@ai-sdk/provider":"3.0.8","@ai-sdk/provider-utils":"4.0.23"},"peerDependencies":{"@ai-sdk/provider":">=3.0.0","@ai-sdk/provider-utils":">=4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/merge-gateway-ai-sdk-provider_0.1.1_1783608746021_0.8310817964325175","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"merge-gateway-ai-sdk-provider","version":"0.2.0","keywords":["merge","gateway","ai","ai-sdk","vercel","llm","openai","anthropic","provider"],"author":{"name":"Merge","email":"support@merge.dev"},"license":"MIT","_id":"merge-gateway-ai-sdk-provider@0.2.0","maintainers":[{"name":"aakash.gupte","email":"aakash.gupte@merge.dev"}],"homepage":"https://github.com/merge-api/merge-gateway-ai-sdk-provider","bugs":{"url":"https://github.com/merge-api/merge-gateway-ai-sdk-provider/issues"},"dist":{"shasum":"48927bed3c05bdeb70a36f521dea0d99103bd6ba","tarball":"https://registry.npmjs.org/merge-gateway-ai-sdk-provider/-/merge-gateway-ai-sdk-provider-0.2.0.tgz","fileCount":17,"integrity":"sha512-3+0SygoZ5yFVHoXJog6lLrbVbnIEXCx5RpyK2LBG2l/uFKPPmgwRhutHE33b9Y0JXiwMn4WTuu5ImjOC6b2O9A==","signatures":[{"sig":"MEYCIQDFuET0F5FMyJr35WbpBYsvGpQpVOgYS+Ocfnd5OLdVPgIhAOO+hhQkwdc1EXMnflARzy4alq/9TK1D0lwkJ56krlsp","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4467162},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","engines":{"node":">=18"},"exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"./v5":{"import":{"types":"./dist/v5/index.d.mts","default":"./dist/v5/index.mjs"},"require":{"types":"./dist/v5/index.d.ts","default":"./dist/v5/index.js"}}},"gitHead":"bb37568693ead259fc3464534e92c44a03449f4a","scripts":{"test":"vitest run","build":"tsup","test:watch":"vitest","prepublishOnly":"npm run build"},"_npmUser":{"name":"aakash.gupte","email":"aakash.gupte@merge.dev"},"repository":{"url":"git+https://github.com/merge-api/merge-gateway-ai-sdk-provider.git","type":"git"},"_npmVersion":"10.9.4","description":"Merge Gateway provider for the Vercel AI SDK","directories":{},"_nodeVersion":"22.22.1","dependencies":{"@ai-sdk/provider-utils":"^4.0.23"},"typesVersions":{"*":{"v5":["./dist/v5/index.d.ts"]}},"_hasShrinkwrap":false,"devDependencies":{"ai":"6.0.157","zod":"4.3.6","tsup":"8.5.1","vitest":"3.0.0","typescript":"~5.7.0","@ai-sdk/provider":"3.0.8","@ai-sdk/provider-utils":"4.0.23"},"peerDependencies":{"@ai-sdk/provider":">=2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/merge-gateway-ai-sdk-provider_0.2.0_1786552333467_0.6126447723019497","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"_id":"merge-gateway-ai-sdk-provider@0.3.0","bugs":{"url":"https://github.com/merge-api/merge-gateway-ai-sdk-provider/issues"},"dist":{"shasum":"7998ae59f1a2f2e63a2a4554412641bafbc95670","tarball":"https://registry.npmjs.org/merge-gateway-ai-sdk-provider/-/merge-gateway-ai-sdk-provider-0.3.0.tgz","fileCount":17,"integrity":"sha512-l2aeXmwi68ismiEMmG3otI92qTQTlj+MdlMwSAnBP62u0Ax268UOB/8XfyRpEhOdVaYzuUg/SNGJ6JzDf4rZXw==","signatures":[{"sig":"MEUCIQC95naZwpCi2fmp7mQ2LvmSLi0NQcqVAdO8eV39IUs/PQIgR8mdZ866+7FnoR5egc/BQp/jfwQDWaApkkoJrh/cE4U=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCPTTaDrBv+y60Mocvcxp2YW5muklar9/XLTXQOOweNQQIgTq/YkqjhiH55Zfkw8w9uEFEg9V2gqUwHTJID7ed6fXE="}],"unpackedSize":4539786},"main":"dist/index.js","name":"merge-gateway-ai-sdk-provider","types":"dist/index.d.ts","author":{"name":"Merge","email":"support@merge.dev"},"module":"dist/index.mjs","engines":{"node":">=18"},"exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"./v5":{"import":{"types":"./dist/v5/index.d.mts","default":"./dist/v5/index.mjs"},"require":{"types":"./dist/v5/index.d.ts","default":"./dist/v5/index.js"}}},"gitHead":"ac714952ffa2d2b5301fba17a80808a3c19e0fc0","license":"MIT","scripts":{"test":"vitest run","build":"tsup","test:watch":"vitest","prepublishOnly":"npm run build"},"version":"0.3.0","_npmUser":{"name":"aakash.gupte","email":"aakash.gupte@merge.dev"},"homepage":"https://github.com/merge-api/merge-gateway-ai-sdk-provider","keywords":["merge","gateway","ai","ai-sdk","vercel","llm","openai","anthropic","provider"],"repository":{"url":"git+https://github.com/merge-api/merge-gateway-ai-sdk-provider.git","type":"git"},"_npmVersion":"10.9.4","description":"Merge Gateway provider for the Vercel AI SDK","directories":{},"maintainers":[{"name":"aakash.gupte","email":"aakash.gupte@merge.dev"}],"_nodeVersion":"22.22.1","dependencies":{"@ai-sdk/provider-utils":"^4.0.23"},"typesVersions":{"*":{"v5":["./dist/v5/index.d.ts"]}},"_hasShrinkwrap":false,"devDependencies":{"ai":"6.0.157","zod":"4.3.6","tsup":"8.5.1","vitest":"3.0.0","typescript":"~5.7.0","@ai-sdk/provider":"3.0.8","@ai-sdk/provider-utils":"4.0.23"},"peerDependencies":{"@ai-sdk/provider":">=2.0.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/merge-gateway-ai-sdk-provider_0.3.0_1789509607352_0.4904780216617348"}}},"time":{"created":"2026-04-10T18:54:43.695Z","modified":"2026-09-15T22:00:07.648Z","0.1.0":"2026-04-10T18:54:43.908Z","0.1.1":"2026-07-09T14:52:26.216Z","0.2.0":"2026-08-12T16:32:13.660Z","0.3.0":"2026-09-15T22:00:07.478Z"},"bugs":{"url":"https://github.com/merge-api/merge-gateway-ai-sdk-provider/issues"},"author":{"name":"Merge","email":"support@merge.dev"},"license":"MIT","homepage":"https://github.com/merge-api/merge-gateway-ai-sdk-provider","keywords":["merge","gateway","ai","ai-sdk","vercel","llm","openai","anthropic","provider"],"repository":{"url":"git+https://github.com/merge-api/merge-gateway-ai-sdk-provider.git","type":"git"},"description":"Merge Gateway provider for the Vercel AI SDK","maintainers":[{"name":"aakash.gupte","email":"aakash.gupte@merge.dev"}],"readme":"# merge-gateway-ai-sdk-provider\n\nMerge Gateway provider for the [Vercel AI SDK](https://ai-sdk.dev). Route requests to OpenAI, Anthropic, Google, and more through a single provider with built-in failover, intelligent routing, and cost optimization.\n\n## Installation\n\n```bash\nnpm install merge-gateway-ai-sdk-provider ai\n```\n\n## Quick start\n\n```typescript\nimport { createMergeGateway } from \"merge-gateway-ai-sdk-provider\";\nimport { generateText } from \"ai\";\n\nconst gateway = createMergeGateway({\n  apiKey: process.env.MERGE_GATEWAY_API_KEY,\n});\n\nconst { text } = await generateText({\n  model: gateway(\"openai/gpt-4o\"),\n  prompt: \"Hello!\",\n});\n\nconsole.log(text);\n```\n\n## Two ways to integrate\n\n### Native provider (recommended)\n\nInstall `merge-gateway-ai-sdk-provider` for typed Gateway features:\n\n```typescript\nimport { createMergeGateway } from \"merge-gateway-ai-sdk-provider\";\n\nconst gateway = createMergeGateway({\n  apiKey: process.env.MERGE_GATEWAY_API_KEY,\n});\n```\n\n### URL shim (zero install)\n\nIf you already have `@ai-sdk/openai`, point it at the Gateway:\n\n```typescript\nimport { createOpenAI } from \"@ai-sdk/openai\";\n\nconst gateway = createOpenAI({\n  apiKey: process.env.MERGE_GATEWAY_API_KEY,\n  baseURL: \"https://api-gateway.merge.dev/v1/ai-sdk\",\n});\n```\n\nBoth approaches hit the same endpoints. The native provider adds typed `providerOptions` for Gateway features.\n\n## Text generation\n\n```typescript\nimport { generateText } from \"ai\";\n\nconst { text } = await generateText({\n  model: gateway(\"openai/gpt-4o\"),\n  prompt: \"Explain recursion with examples.\",\n});\n```\n\n## Streaming\n\n```typescript\nimport { streamText } from \"ai\";\n\nconst result = streamText({\n  model: gateway(\"anthropic/claude-sonnet-4-20250514\"),\n  prompt: \"Write a short story about an otter.\",\n});\n\nfor await (const chunk of result.textStream) {\n  process.stdout.write(chunk);\n}\n```\n\n## Embeddings\n\n```typescript\nimport { embedMany } from \"ai\";\n\nconst { embeddings } = await embedMany({\n  model: gateway.textEmbeddingModel(\"openai/text-embedding-3-small\"),\n  values: [\"hello\", \"world\"],\n});\n```\n\n## Gateway features\n\nThe native provider exposes Gateway-specific features via `providerOptions.mergeGateway`:\n\n### Tags\n\nCategorize requests for filtering, cost tracking, and routing policy overrides:\n\n```typescript\nconst { text } = await generateText({\n  model: gateway(\"openai/gpt-4o\"),\n  prompt: \"Hello!\",\n  providerOptions: {\n    mergeGateway: {\n      tags: [\n        { key: \"env\", value: \"production\" },\n        { key: \"team\", value: \"data-science\" },\n      ],\n    },\n  },\n});\n```\n\n### Vendor routing\n\nControl which execution host handles the request:\n\n```typescript\nconst { text } = await generateText({\n  model: gateway(\"anthropic/claude-sonnet-4-20250514\"),\n  prompt: \"Hello!\",\n  providerOptions: {\n    mergeGateway: {\n      vendor: \"bedrock\", // Force AWS Bedrock\n      // Or: vendors: [\"bedrock\", \"anthropic\"] for ordered preference\n    },\n  },\n});\n```\n\n### Project association\n\nTrack cost and usage per project:\n\n```typescript\nconst { text } = await generateText({\n  model: gateway(\"openai/gpt-4o\"),\n  prompt: \"Hello!\",\n  providerOptions: {\n    mergeGateway: {\n      projectId: \"proj_abc123\",\n    },\n  },\n});\n```\n\n### Extended thinking\n\nEnable reasoning/thinking for supported models:\n\n```typescript\nconst { text } = await generateText({\n  model: gateway(\"anthropic/claude-sonnet-4-20250514\"),\n  prompt: \"What is 15 * 23? Show your work.\",\n  providerOptions: {\n    mergeGateway: {\n      thinking: { type: \"enabled\", budgetTokens: 10000 },\n    },\n  },\n});\n```\n\n### Routing metadata\n\nGet details about routing decisions, cost, and latency:\n\n```typescript\nconst { text, providerMetadata } = await generateText({\n  model: gateway(\"openai/gpt-4o\"),\n  prompt: \"Hello!\",\n  providerOptions: {\n    mergeGateway: {\n      includeRoutingMetadata: true,\n    },\n  },\n});\n\nconst routing = providerMetadata?.mergeGateway?.routing;\nconsole.log(routing?.model_used);    // \"gpt-4o\"\nconsole.log(routing?.vendor_used);   // \"openai\"\nconsole.log(routing?.cost_usd);      // 0.003\nconsole.log(routing?.strategy);      // \"fallback\"\n```\n\n## Attachments\n\nFile parts are forwarded to the model. Images become OpenAI `image_url` blocks,\naudio becomes `input_audio`, and everything else (PDF, Office documents, video)\nbecomes the gateway's unified `file` block, which it translates into each\nvendor's own document format.\n\n```typescript\nimport { readFileSync } from \"node:fs\";\n\nconst { text } = await generateText({\n  model: gateway(\"openai/gpt-4o\"),\n  messages: [\n    {\n      role: \"user\",\n      content: [\n        { type: \"text\", text: \"Summarize this contract.\" },\n        {\n          type: \"file\",\n          mediaType: \"application/pdf\",\n          filename: \"contract.pdf\",\n          data: readFileSync(\"contract.pdf\"),\n        },\n      ],\n    },\n  ],\n});\n```\n\n`data` may be bytes, a base64 string, a `data:` URI, or a URL, and the AI SDK v6\ntagged forms (`{ type: \"data\" | \"url\" | \"text\" }`) are read as well. Provider\nfile references (`{ type: \"reference\" }`) cannot be resolved by the gateway.\n\nWhether the model can *read* a given media type still depends on the route: the\ngateway forwards the attachment, and a vendor that does not accept it returns an\nerror. Anything this provider cannot forward is reported in `warnings` on the\nresult rather than dropped silently:\n\n```typescript\nconst { text, warnings } = await generateText({ /* ... */ });\n// warnings: [{ type: \"unsupported\", feature: \"file attachment\", details: \"...\" }]\n```\n\n## Prompt caching\n\nCache markers ride on `providerOptions`, either on a content part or on the\nmessage as a whole, and are translated into the gateway's `cache_control`:\n\n```typescript\nconst { text } = await generateText({\n  model: gateway(\"anthropic/claude-sonnet-5\"),\n  messages: [\n    {\n      role: \"system\",\n      content: \"...long stable instructions...\",\n      providerOptions: { anthropic: { cacheControl: { type: \"ephemeral\" } } },\n    },\n    { role: \"user\", content: \"What changed in section 4?\" },\n  ],\n});\n```\n\nThe `anthropic`, `openrouter`, and `mergeGateway` namespaces are all read, in\neither the `cacheControl` or `cache_control` spelling. Caching applies on\n`explicit` routes; the response reports cache activity in its usage.\n\n## Tool calling\n\nTools work the same as with any AI SDK provider:\n\n```typescript\nimport { generateText, tool } from \"ai\";\nimport { z } from \"zod\";\n\nconst { text, toolCalls } = await generateText({\n  model: gateway(\"openai/gpt-4o\"),\n  prompt: \"What's the weather in San Francisco?\",\n  tools: {\n    getWeather: tool({\n      description: \"Get the current weather for a city\",\n      parameters: z.object({\n        city: z.string(),\n      }),\n      execute: async ({ city }) => `Sunny and 65F in ${city}`,\n    }),\n  },\n});\n```\n\n## Structured output\n\n`generateObject` / `streamObject` map to the gateway's native `json_schema`\nstructured output. Schemas pass through untouched — nested objects, `$defs`,\n`anyOf`, and optional fields all reach the provider as you wrote them.\n\n```typescript\nimport { generateObject } from \"ai\";\nimport { z } from \"zod\";\n\nconst { object } = await generateObject({\n  model: gateway(\"openai/gpt-4o\"),\n  prompt: \"Invent a person\",\n  schema: z.object({\n    name: z.string(),\n    age: z.number(),\n    occupation: z.string(),\n  }),\n});\n```\n\n### Controlling `strict`\n\nThe `strict` flag defaults to `true`. Schemas with optional fields, unions\n(`anyOf`), or open objects are rejected by OpenAI-style strict mode — turn it\noff per call (or per model via `gateway(modelId, { strictJsonSchema: false })`):\n\n```typescript\nconst { object } = await generateObject({\n  model: gateway(\"openai/gpt-4o\"),\n  prompt: \"Invent a person with an email or phone contact\",\n  schema: z.object({\n    name: z.string(),\n    age: z.number().optional(),\n    contact: z.union([\n      z.object({ kind: z.literal(\"email\"), address: z.string() }),\n      z.object({ kind: z.literal(\"phone\"), number: z.string() }),\n    ]),\n  }),\n  providerOptions: { mergeGateway: { strictJsonSchema: false } },\n});\n```\n\nIf a routed model can't honor the schema, the gateway fails loudly with a\n`400 unsupported_params` (surfaced as an `APICallError`) — never a silent\nfallback to best-effort JSON.\n\n## AI SDK v5\n\nAI SDK v5 (`ai@5`) uses provider spec v2 and cannot load the default entry\npoint. Import from `merge-gateway-ai-sdk-provider/v5` instead — same\nimplementation and options, wrapped in a v2 adapter:\n\n```typescript\nimport { createMergeGateway } from \"merge-gateway-ai-sdk-provider/v5\";\n```\n\n| AI SDK major | Import |\n|--------------|--------|\n| `ai@6` | `merge-gateway-ai-sdk-provider` |\n| `ai@5` | `merge-gateway-ai-sdk-provider/v5` |\n| `ai@4` | not supported — use the [URL shim](#url-shim-zero-install) |\n\n## API reference\n\n### `createMergeGateway(options?)`\n\nCreates a Merge Gateway provider instance.\n\n| Option | Type | Default | Description |\n|--------|------|---------|-------------|\n| `apiKey` | `string` | `MERGE_GATEWAY_API_KEY` env | Merge Gateway API key |\n| `baseURL` | `string` | `https://api-gateway.merge.dev/v1/ai-sdk` | Base URL for AI SDK endpoints |\n| `headers` | `Record<string, string>` | — | Custom headers for every request |\n| `fetch` | `typeof fetch` | — | Custom fetch implementation |\n\n### Provider methods\n\n| Method | Returns | Description |\n|--------|---------|-------------|\n| `gateway(modelId)` | `MergeGatewayChatLanguageModel` | Create a chat model |\n| `gateway.chat(modelId)` | `MergeGatewayChatLanguageModel` | Create a chat model (explicit) |\n| `gateway.textEmbeddingModel(modelId)` | `MergeGatewayEmbeddingModel` | Create an embedding model |\n\n### `MergeGatewayProviderOptions`\n\nPassed via `providerOptions.mergeGateway`:\n\n| Option | Type | Description |\n|--------|------|-------------|\n| `tags` | `Array<{ key: string; value: string }>` | Request categorization tags |\n| `projectId` | `string` | Project ID for cost tracking |\n| `vendor` | `string` | Single vendor preference |\n| `vendors` | `string[]` | Ordered vendor preference list |\n| `includeRoutingMetadata` | `boolean` | Include routing metadata in response |\n| `thinking` | `{ type: \"enabled\" \\| \"disabled\"; budgetTokens: number }` | Extended thinking config |\n| `strictJsonSchema` | `boolean` | `strict` flag for `json_schema` structured output (default `true`; set `false` for schemas with optional fields/unions) |\n\n## License\n\nMIT\n","readmeFilename":"README.md"}