adk-llm-bridge 0.3.1 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/README.md +129 -152
  2. package/dist/config.d.ts +4 -1
  3. package/dist/config.d.ts.map +1 -1
  4. package/dist/constants.d.ts +4 -0
  5. package/dist/constants.d.ts.map +1 -1
  6. package/dist/core/base-provider-llm.d.ts +1 -4
  7. package/dist/core/base-provider-llm.d.ts.map +1 -1
  8. package/dist/core/index.d.ts +1 -1
  9. package/dist/core/index.d.ts.map +1 -1
  10. package/dist/core/openai-compatible-llm.d.ts +2 -2
  11. package/dist/core/openai-compatible-llm.d.ts.map +1 -1
  12. package/dist/index.d.ts +11 -10
  13. package/dist/index.d.ts.map +1 -1
  14. package/dist/index.js +43 -3
  15. package/dist/index.js.map +73 -13
  16. package/dist/providers/ai-gateway/ai-gateway-llm.d.ts +0 -7
  17. package/dist/providers/ai-gateway/ai-gateway-llm.d.ts.map +1 -1
  18. package/dist/providers/ai-gateway/factory.d.ts +1 -1
  19. package/dist/providers/ai-gateway/factory.d.ts.map +1 -1
  20. package/dist/providers/ai-gateway/index.d.ts +1 -1
  21. package/dist/providers/ai-gateway/index.d.ts.map +1 -1
  22. package/dist/providers/ai-gateway/register.d.ts.map +1 -1
  23. package/dist/providers/anthropic/anthropic-llm.d.ts +98 -0
  24. package/dist/providers/anthropic/anthropic-llm.d.ts.map +1 -0
  25. package/dist/providers/anthropic/constants.d.ts +36 -0
  26. package/dist/providers/anthropic/constants.d.ts.map +1 -0
  27. package/dist/providers/anthropic/converters/request.d.ts +51 -0
  28. package/dist/providers/anthropic/converters/request.d.ts.map +1 -0
  29. package/dist/providers/anthropic/converters/response.d.ts +63 -0
  30. package/dist/providers/anthropic/converters/response.d.ts.map +1 -0
  31. package/dist/providers/anthropic/factory.d.ts +60 -0
  32. package/dist/providers/anthropic/factory.d.ts.map +1 -0
  33. package/dist/providers/anthropic/index.d.ts +33 -0
  34. package/dist/providers/anthropic/index.d.ts.map +1 -0
  35. package/dist/providers/anthropic/register.d.ts +65 -0
  36. package/dist/providers/anthropic/register.d.ts.map +1 -0
  37. package/dist/providers/custom/custom-llm.d.ts +121 -0
  38. package/dist/providers/custom/custom-llm.d.ts.map +1 -0
  39. package/dist/providers/custom/factory.d.ts +145 -0
  40. package/dist/providers/custom/factory.d.ts.map +1 -0
  41. package/dist/providers/custom/index.d.ts +35 -0
  42. package/dist/providers/custom/index.d.ts.map +1 -0
  43. package/dist/providers/index.d.ts +17 -1
  44. package/dist/providers/index.d.ts.map +1 -1
  45. package/dist/providers/openai/constants.d.ts +34 -0
  46. package/dist/providers/openai/constants.d.ts.map +1 -0
  47. package/dist/providers/openai/factory.d.ts +61 -0
  48. package/dist/providers/openai/factory.d.ts.map +1 -0
  49. package/dist/providers/openai/index.d.ts +29 -0
  50. package/dist/providers/openai/index.d.ts.map +1 -0
  51. package/dist/providers/openai/openai-llm.d.ts +69 -0
  52. package/dist/providers/openai/openai-llm.d.ts.map +1 -0
  53. package/dist/providers/openai/register.d.ts +65 -0
  54. package/dist/providers/openai/register.d.ts.map +1 -0
  55. package/dist/providers/openrouter/factory.d.ts +1 -1
  56. package/dist/providers/openrouter/factory.d.ts.map +1 -1
  57. package/dist/providers/openrouter/index.d.ts +2 -2
  58. package/dist/providers/openrouter/index.d.ts.map +1 -1
  59. package/dist/providers/openrouter/openrouter-llm.d.ts +0 -7
  60. package/dist/providers/openrouter/openrouter-llm.d.ts.map +1 -1
  61. package/dist/providers/openrouter/register.d.ts.map +1 -1
  62. package/dist/providers/xai/constants.d.ts +30 -0
  63. package/dist/providers/xai/constants.d.ts.map +1 -0
  64. package/dist/providers/xai/factory.d.ts +54 -0
  65. package/dist/providers/xai/factory.d.ts.map +1 -0
  66. package/dist/providers/xai/index.d.ts +29 -0
  67. package/dist/providers/xai/index.d.ts.map +1 -0
  68. package/dist/providers/xai/register.d.ts +64 -0
  69. package/dist/providers/xai/register.d.ts.map +1 -0
  70. package/dist/providers/xai/xai-llm.d.ts +66 -0
  71. package/dist/providers/xai/xai-llm.d.ts.map +1 -0
  72. package/dist/types.d.ts +249 -0
  73. package/dist/types.d.ts.map +1 -1
  74. package/package.json +4 -3
package/README.md CHANGED
@@ -7,13 +7,12 @@ Use **any LLM** with [Google ADK TypeScript](https://github.com/google/adk-js) i
7
7
 
8
8
  ## Why?
9
9
 
10
- Google ADK TypeScript comes with built-in Gemini support. This lightweight bridge extends it to work with **any model** from providers like Anthropic, OpenAI, Meta, and more—while keeping all ADK features like multi-agent orchestration, tool calling, and streaming.
10
+ Google ADK TypeScript comes with built-in Gemini support. This bridge extends it to work with **any model** from providers like Anthropic, OpenAI, Meta, and more—while keeping all ADK features like multi-agent orchestration, tool calling, and streaming.
11
11
 
12
12
  ### Key Benefits
13
13
 
14
- - **Minimal** — ~10KB bundle (~3KB gzipped), single dependency (`openai`)
15
14
  - **Simple** — 3 lines to integrate any model
16
- - **Secure** — No complex dependency tree, just the battle-tested OpenAI SDK
15
+ - **Battle-tested** — Built on the official OpenAI and Anthropic SDKs
17
16
  - **Compatible** — Works with any OpenAI-compatible API (AI Gateway, OpenRouter, etc.)
18
17
 
19
18
  ## Supported Providers
@@ -22,28 +21,10 @@ Google ADK TypeScript comes with built-in Gemini support. This lightweight bridg
22
21
  |----------|--------|----------|
23
22
  | **[Vercel AI Gateway](https://vercel.com/ai-gateway)** | 100+ models (Claude, GPT, Llama, Gemini, etc.) | Simple, fast |
24
23
  | **[OpenRouter](https://openrouter.ai/)** | 100+ models | Provider routing, fallbacks, price optimization |
25
-
26
- ## How It Works
27
-
28
- ```mermaid
29
- flowchart LR
30
- subgraph Your App
31
- A[LlmAgent] --> B[adk-llm-bridge]
32
- end
33
-
34
- subgraph adk-llm-bridge
35
- B --> C[AIGatewayLlm]
36
- B --> D[OpenRouterLlm]
37
- end
38
-
39
- C --> E[Vercel AI Gateway]
40
- D --> F[OpenRouter]
41
-
42
- E --> G[Anthropic / OpenAI / Google / ...]
43
- F --> G
44
- ```
45
-
46
- The package converts ADK's internal request format to OpenAI-compatible format, sends it through your chosen gateway, and converts the response back to ADK format.
24
+ | **[OpenAI](https://openai.com/)** | GPT-4, o1, o3, etc. | Direct API access |
25
+ | **[Anthropic](https://anthropic.com/)** | Claude models | Direct API access |
26
+ | **[xAI](https://x.ai/)** | Grok models | Direct API access |
27
+ | **Custom (OpenAI-compatible)** | Any model | Ollama, vLLM, Azure OpenAI, LM Studio, etc. |
47
28
 
48
29
  ## Installation
49
30
 
@@ -61,34 +42,55 @@ npm install adk-llm-bridge @google/adk
61
42
 
62
43
  ## Quick Start
63
44
 
64
- Just 3 lines to use Claude, GPT, Gemini, or any model with ADK:
65
-
66
45
  ```typescript
67
- import { LlmAgent, LLMRegistry } from '@google/adk';
68
- import { AIGatewayLlm } from 'adk-llm-bridge'; // 1. Import
69
-
70
- LLMRegistry.register(AIGatewayLlm); // 2. Register
46
+ import { LlmAgent } from '@google/adk';
47
+ import { AIGateway } from 'adk-llm-bridge';
71
48
 
72
- const agent = new LlmAgent({ // 3. Use any model
49
+ const agent = new LlmAgent({
73
50
  name: 'assistant',
74
- model: 'anthropic/claude-sonnet-4.5', // Claude, GPT, Llama, etc.
51
+ model: AIGateway('anthropic/claude-sonnet-4'),
75
52
  instruction: 'You are a helpful assistant.',
76
53
  });
77
54
  ```
78
55
 
79
56
  That's it. All ADK features work: tools, streaming, multi-agent, etc.
80
57
 
81
- ### With OpenRouter
58
+ ### Other Providers
59
+
60
+ ```typescript
61
+ import { OpenRouter, OpenAI, Anthropic, XAI, Custom } from 'adk-llm-bridge';
62
+
63
+ // OpenRouter - 100+ models with routing
64
+ model: OpenRouter('anthropic/claude-sonnet-4')
65
+
66
+ // OpenAI - Direct API
67
+ model: OpenAI('gpt-4.1')
68
+
69
+ // Anthropic - Direct API
70
+ model: Anthropic('claude-sonnet-4-5')
71
+
72
+ // xAI - Direct API
73
+ model: XAI('grok-3-beta')
74
+
75
+ // Local models (LM Studio, Ollama, etc.)
76
+ model: Custom('your-model', { baseURL: 'http://localhost:1234/v1' })
77
+ ```
78
+
79
+ See the [examples](./examples) directory for complete implementations.
80
+
81
+ ### Using LLMRegistry (Alternative)
82
+
83
+ You can also register providers with ADK's LLMRegistry to use string-based model names:
82
84
 
83
85
  ```typescript
84
86
  import { LlmAgent, LLMRegistry } from '@google/adk';
85
- import { OpenRouterLlm } from 'adk-llm-bridge';
87
+ import { AnthropicLlm } from 'adk-llm-bridge';
86
88
 
87
- LLMRegistry.register(OpenRouterLlm);
89
+ LLMRegistry.register(AnthropicLlm);
88
90
 
89
91
  const agent = new LlmAgent({
90
92
  name: 'assistant',
91
- model: 'anthropic/claude-sonnet-4.5',
93
+ model: 'claude-sonnet-4-5', // String-based model name
92
94
  instruction: 'You are a helpful assistant.',
93
95
  });
94
96
  ```
@@ -110,71 +112,38 @@ OPENROUTER_SITE_URL=https://your-site.com # optional, for ranking
110
112
  OPENROUTER_APP_NAME=Your App Name # optional, for ranking
111
113
  ```
112
114
 
115
+ **Direct Providers:**
116
+ ```bash
117
+ OPENAI_API_KEY=your-openai-key
118
+ ANTHROPIC_API_KEY=your-anthropic-key
119
+ XAI_API_KEY=your-xai-key
120
+ ```
121
+
113
122
  ### Programmatic Configuration
114
123
 
124
+ Pass options directly to the factory functions:
125
+
115
126
  ```typescript
116
- import { registerAIGateway, registerOpenRouter } from 'adk-llm-bridge';
127
+ import { AIGateway, OpenRouter, Anthropic } from 'adk-llm-bridge';
117
128
 
118
- // AI Gateway
119
- registerAIGateway({
129
+ // AI Gateway with custom URL
130
+ model: AIGateway('anthropic/claude-sonnet-4', {
120
131
  apiKey: process.env.MY_API_KEY,
121
132
  baseURL: 'https://my-gateway.example.com/v1',
122
- });
133
+ })
123
134
 
124
- // OpenRouter
125
- registerOpenRouter({
135
+ // OpenRouter with site info
136
+ model: OpenRouter('anthropic/claude-sonnet-4', {
126
137
  apiKey: process.env.OPENROUTER_API_KEY,
127
138
  siteUrl: 'https://your-site.com',
128
139
  appName: 'Your App',
129
- });
130
- ```
131
-
132
- ### Factory Functions (Per-Agent Config)
133
-
134
- ```typescript
135
- import { LlmAgent } from '@google/adk';
136
- import { AIGateway, OpenRouter } from 'adk-llm-bridge';
137
-
138
- // AI Gateway
139
- const agent1 = new LlmAgent({
140
- name: 'assistant',
141
- model: AIGateway('anthropic/claude-sonnet-4.5', { timeout: 30000 }),
142
- instruction: 'You are helpful.',
143
- });
144
-
145
- // OpenRouter with provider routing
146
- const agent2 = new LlmAgent({
147
- name: 'fast-assistant',
148
- model: OpenRouter('anthropic/claude-sonnet-4.5', {
149
- provider: {
150
- sort: 'latency',
151
- allow_fallbacks: true,
152
- },
153
- }),
154
- instruction: 'You are helpful.',
155
- });
156
- ```
140
+ })
157
141
 
158
- ## OpenRouter Features
159
-
160
- OpenRouter provides additional features not available in AI Gateway:
161
-
162
- ```typescript
163
- import { OpenRouter } from 'adk-llm-bridge';
164
-
165
- const llm = OpenRouter('anthropic/claude-sonnet-4.5', {
166
- // Ranking headers (improves your rate limits)
167
- siteUrl: 'https://your-site.com',
168
- appName: 'Your App',
169
-
170
- // Provider routing
171
- provider: {
172
- order: ['Anthropic', 'Google'], // Prefer specific providers
173
- sort: 'latency', // or 'price', 'throughput'
174
- allow_fallbacks: true, // Fallback if primary fails
175
- data_collection: 'deny', // Opt-out of data collection
176
- },
177
- });
142
+ // Anthropic with custom max tokens
143
+ model: Anthropic('claude-sonnet-4-5', {
144
+ apiKey: process.env.ANTHROPIC_API_KEY,
145
+ maxTokens: 8192,
146
+ })
178
147
  ```
179
148
 
180
149
  ## Model Format
@@ -182,26 +151,26 @@ const llm = OpenRouter('anthropic/claude-sonnet-4.5', {
182
151
  Use the `provider/model` format:
183
152
 
184
153
  ```
185
- anthropic/claude-opus-4.5
186
- openai/gpt-5.2-pro
187
- google/gemini-3-pro
188
- meta/llama-3.3-70b-instruct
154
+ anthropic/claude-sonnet-4
155
+ openai/gpt-5
156
+ google/gemini-3-flash
157
+ meta/llama-4-maverick
189
158
  mistral/mistral-large-3
190
159
  xai/grok-4.1
191
- deepseek/deepseek-r1
160
+ deepseek/deepseek-chat
192
161
  ```
193
162
 
194
163
  ### Popular Models
195
164
 
196
165
  | Provider | Models |
197
166
  |----------|--------|
198
- | Anthropic | `anthropic/claude-sonnet-4.5`, `anthropic/claude-opus-4.5` |
199
- | OpenAI | `openai/gpt-5.2-pro`, `openai/gpt-4.1`, `openai/o3-mini` |
200
- | Google | `google/gemini-3-pro`, `google/gemini-3-flash`, `google/gemini-2.5-pro` |
201
- | Meta | `meta/llama-3.3-70b-instruct`, `meta/llama-3.1-405b-instruct` |
202
- | Mistral | `mistral/mistral-large-3`, `mistral/mistral-large-2411` |
203
- | xAI | `xai/grok-4.1`, `xai/grok-4-fast`, `xai/grok-3` |
204
- | DeepSeek | `deepseek/deepseek-v3.2`, `deepseek/deepseek-r1` |
167
+ | Anthropic | `anthropic/claude-sonnet-4`, `anthropic/claude-opus-4.5` |
168
+ | OpenAI | `openai/gpt-5`, `openai/gpt-5-mini`, `openai/o3` |
169
+ | Google | `google/gemini-3-flash`, `google/gemini-3-pro`, `google/gemini-2.5-pro` |
170
+ | Meta | `meta/llama-4-maverick`, `meta/llama-4-scout`, `meta/llama-3.3-70b-instruct` |
171
+ | Mistral | `mistral/mistral-large-3`, `mistral/ministral-3-14b` |
172
+ | xAI | `xai/grok-4.1`, `xai/grok-4`, `xai/grok-3` |
173
+ | DeepSeek | `deepseek/deepseek-chat`, `deepseek/deepseek-reasoner` |
205
174
 
206
175
  Browse all models:
207
176
  - [Vercel AI Gateway Models](https://vercel.com/ai-gateway/models)
@@ -219,12 +188,10 @@ Browse all models:
219
188
  ## Tool Calling Example
220
189
 
221
190
  ```typescript
222
- import { FunctionTool, LlmAgent, LLMRegistry } from '@google/adk';
223
- import { AIGatewayLlm } from 'adk-llm-bridge';
191
+ import { FunctionTool, LlmAgent } from '@google/adk';
192
+ import { Anthropic } from 'adk-llm-bridge';
224
193
  import { z } from 'zod';
225
194
 
226
- LLMRegistry.register(AIGatewayLlm);
227
-
228
195
  const getWeather = new FunctionTool({
229
196
  name: 'get_weather',
230
197
  description: 'Get current weather for a city',
@@ -238,63 +205,28 @@ const getWeather = new FunctionTool({
238
205
 
239
206
  const agent = new LlmAgent({
240
207
  name: 'weather-assistant',
241
- model: 'anthropic/claude-sonnet-4.5',
208
+ model: Anthropic('claude-sonnet-4-5'),
242
209
  instruction: 'You help users check the weather.',
243
210
  tools: [getWeather],
244
211
  });
245
212
  ```
246
213
 
247
- ## Using with adk-devtools
248
-
249
- When using `adk-devtools`, import `LLMRegistry` from `@google/adk` directly:
250
-
251
- ```typescript
252
- import { LlmAgent, LLMRegistry } from '@google/adk';
253
- import { AIGatewayLlm, OpenRouterLlm } from 'adk-llm-bridge';
254
-
255
- // Register the provider you want to use
256
- LLMRegistry.register(AIGatewayLlm);
257
- // or
258
- LLMRegistry.register(OpenRouterLlm);
259
-
260
- export const rootAgent = new LlmAgent({
261
- name: 'assistant',
262
- model: 'anthropic/claude-sonnet-4.5',
263
- instruction: 'You are helpful.',
264
- });
265
- ```
266
-
267
- Then run:
268
- ```bash
269
- bunx @google/adk-devtools web
270
- ```
271
-
272
214
  ## API Reference
273
215
 
274
- ### Classes
275
-
276
- | Class | Description |
277
- |-------|-------------|
278
- | `AIGatewayLlm` | LLM class for Vercel AI Gateway |
279
- | `OpenRouterLlm` | LLM class for OpenRouter |
280
-
281
216
  ### Factory Functions
282
217
 
283
218
  | Function | Description |
284
219
  |----------|-------------|
285
- | `AIGateway(model, options?)` | Create AI Gateway LLM instance |
286
- | `OpenRouter(model, options?)` | Create OpenRouter LLM instance |
287
-
288
- ### Registration Functions
289
-
290
- | Function | Description |
291
- |----------|-------------|
292
- | `registerAIGateway(options?)` | Register AIGatewayLlm with LLMRegistry |
293
- | `registerOpenRouter(options?)` | Register OpenRouterLlm with LLMRegistry |
220
+ | `AIGateway(model, options?)` | Vercel AI Gateway (100+ models) |
221
+ | `OpenRouter(model, options?)` | OpenRouter (100+ models) |
222
+ | `OpenAI(model, options?)` | OpenAI direct API |
223
+ | `Anthropic(model, options?)` | Anthropic direct API |
224
+ | `XAI(model, options?)` | xAI direct API |
225
+ | `Custom(model, options)` | Any OpenAI-compatible API |
294
226
 
295
227
  ### Configuration Options
296
228
 
297
- **AIGateway / AIGatewayLlm:**
229
+ **AIGateway:**
298
230
 
299
231
  | Option | Type | Default | Description |
300
232
  |--------|------|---------|-------------|
@@ -303,7 +235,7 @@ bunx @google/adk-devtools web
303
235
  | `timeout` | `number` | `60000` | Request timeout (ms) |
304
236
  | `maxRetries` | `number` | `2` | Max retry attempts |
305
237
 
306
- **OpenRouter / OpenRouterLlm:**
238
+ **OpenRouter:
307
239
 
308
240
  | Option | Type | Default | Description |
309
241
  |--------|------|---------|-------------|
@@ -315,18 +247,63 @@ bunx @google/adk-devtools web
315
247
  | `timeout` | `number` | `60000` | Request timeout (ms) |
316
248
  | `maxRetries` | `number` | `2` | Max retry attempts |
317
249
 
250
+ **OpenAI:
251
+
252
+ | Option | Type | Default | Description |
253
+ |--------|------|---------|-------------|
254
+ | `apiKey` | `string` | `process.env.OPENAI_API_KEY` | API key |
255
+ | `organization` | `string` | `process.env.OPENAI_ORGANIZATION` | Organization ID |
256
+ | `project` | `string` | `process.env.OPENAI_PROJECT` | Project ID |
257
+ | `timeout` | `number` | `60000` | Request timeout (ms) |
258
+ | `maxRetries` | `number` | `2` | Max retry attempts |
259
+
260
+ **Anthropic:
261
+
262
+ | Option | Type | Default | Description |
263
+ |--------|------|---------|-------------|
264
+ | `apiKey` | `string` | `process.env.ANTHROPIC_API_KEY` | API key |
265
+ | `maxTokens` | `number` | `4096` | Max tokens in response |
266
+ | `timeout` | `number` | `60000` | Request timeout (ms) |
267
+ | `maxRetries` | `number` | `2` | Max retry attempts |
268
+
269
+ **XAI:
270
+
271
+ | Option | Type | Default | Description |
272
+ |--------|------|---------|-------------|
273
+ | `apiKey` | `string` | `process.env.XAI_API_KEY` | API key |
274
+ | `timeout` | `number` | `60000` | Request timeout (ms) |
275
+ | `maxRetries` | `number` | `2` | Max retry attempts |
276
+
277
+ **Custom:
278
+
279
+ | Option | Type | Default | Description |
280
+ |--------|------|---------|-------------|
281
+ | `model` | `string` | - | Model name (required) |
282
+ | `baseURL` | `string` | - | API base URL (required) |
283
+ | `name` | `string` | `"custom"` | Provider name for logs/errors |
284
+ | `apiKey` | `string` | - | API key for authentication |
285
+ | `headers` | `Record<string, string>` | - | Additional HTTP headers |
286
+ | `queryParams` | `Record<string, string>` | - | Query parameters for all requests |
287
+ | `providerOptions` | `Record<string, unknown>` | - | Additional options for request body |
288
+ | `timeout` | `number` | `60000` | Request timeout (ms) |
289
+ | `maxRetries` | `number` | `2` | Max retry attempts |
290
+
318
291
  ## Examples
319
292
 
320
293
  See the [examples](./examples) directory:
321
294
 
322
295
  - **[basic-agent-ai-gateway](./examples/basic-agent-ai-gateway)** - Multi-agent HelpDesk with AI Gateway
323
296
  - **[basic-agent-openrouter](./examples/basic-agent-openrouter)** - Multi-agent HelpDesk with OpenRouter
297
+ - **[basic-agent-openai](./examples/basic-agent-openai)** - Multi-agent HelpDesk with OpenAI
298
+ - **[basic-agent-anthropic](./examples/basic-agent-anthropic)** - Multi-agent HelpDesk with Anthropic
299
+ - **[basic-agent-xai](./examples/basic-agent-xai)** - Multi-agent HelpDesk with xAI
300
+ - **[basic-agent-lmstudio](./examples/basic-agent-lmstudio)** - Multi-agent HelpDesk with LM Studio
324
301
  - **[express-server](./examples/express-server)** - Production HTTP API with sessions, streaming, tools
325
302
 
326
303
  ## Requirements
327
304
 
328
305
  - Node.js >= 18.0.0
329
- - `@google/adk` >= 0.2.0
306
+ - `@google/adk` >= 0.2.2
330
307
 
331
308
  ## Contributing
332
309
 
package/dist/config.d.ts CHANGED
@@ -34,7 +34,7 @@
34
34
  * });
35
35
  * ```
36
36
  */
37
- import type { RegisterOptions, OpenRouterRegisterOptions } from "./types";
37
+ import type { AnthropicRegisterOptions, OpenAIRegisterOptions, OpenRouterRegisterOptions, RegisterOptions, XAIRegisterOptions } from "./types";
38
38
  /**
39
39
  * Mapping of provider identifiers to their configuration types.
40
40
  *
@@ -43,6 +43,9 @@ import type { RegisterOptions, OpenRouterRegisterOptions } from "./types";
43
43
  type ProviderConfigMap = {
44
44
  "ai-gateway": RegisterOptions;
45
45
  openrouter: OpenRouterRegisterOptions;
46
+ openai: OpenAIRegisterOptions;
47
+ xai: XAIRegisterOptions;
48
+ anthropic: AnthropicRegisterOptions;
46
49
  };
47
50
  /**
48
51
  * Valid provider type identifiers.
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AAE1E;;;;GAIG;AACH,KAAK,iBAAiB,GAAG;IACvB,YAAY,EAAE,eAAe,CAAC;IAC9B,UAAU,EAAE,yBAAyB,CAAC;CACvC,CAAC;AAEF;;;;GAIG;AACH,KAAK,YAAY,GAAG,MAAM,iBAAiB,CAAC;AAU5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,YAAY,EACtD,QAAQ,EAAE,CAAC,EACX,OAAO,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAC5B,IAAI,CAEN;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,YAAY,EACtD,QAAQ,EAAE,CAAC,GACV,QAAQ,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS,CAE5C;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,YAAY,GAAG,IAAI,CAEhE;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,eAAe,IAAI,IA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IAAI,CAItC;AAMD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI,CAExD;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,IAAI,QAAQ,CAAC,eAAe,CAAC,CAErD;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,IAAI,IAAI,CAElC"}
@@ -38,6 +38,8 @@ export declare const DEFAULT_MAX_RETRIES = 2;
38
38
  * Matches any model identifier with the format "provider/model".
39
39
  * AI Gateway validates actual model availability at runtime.
40
40
  *
41
+ * Note: Do not include ^ or $ anchors - ADK's LLMRegistry adds them automatically.
42
+ *
41
43
  * @constant
42
44
  * @example
43
45
  * ```typescript
@@ -82,6 +84,8 @@ export declare const OPENROUTER_BASE_URL = "https://openrouter.ai/api/v1";
82
84
  *
83
85
  * Uses the same "provider/model" format as AI Gateway.
84
86
  *
87
+ * Note: Do not include ^ or $ anchors - ADK's LLMRegistry adds them automatically.
88
+ *
85
89
  * @constant
86
90
  * @example
87
91
  * ```typescript
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;GAOG;AAMH;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,oCAAoC,CAAC;AAElE;;;;;GAKG;AACH,eAAO,MAAM,eAAe,QAAS,CAAC;AAEtC;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,IAAI,CAAC;AAErC;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,cAAc,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAiB,CAAC;AAEhE;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,GAAG;IACd,uDAAuD;;IAGvD,kDAAkD;;IAGlD,wEAAwE;;IAGxE,uEAAuE;;CAE/D,CAAC;AAMX;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,iCAAiC,CAAC;AAElE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,yBAAyB,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAiB,CAAC;AAE3E;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,cAAc;IACzB,kDAAkD;;IAGlD,4DAA4D;;IAG5D,4DAA4D;;CAEpD,CAAC;AAMX;;;;;;GAMG;AACH,eAAO,MAAM,YAAY;IACvB,6CAA6C;;IAG7C,6CAA6C;;CAErC,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;GAOG;AAMH;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,oCAAoC,CAAC;AAElE;;;;;GAKG;AACH,eAAO,MAAM,eAAe,QAAS,CAAC;AAEtC;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,IAAI,CAAC;AAErC;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,cAAc,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAe,CAAC;AAE9D;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,GAAG;IACd,uDAAuD;;IAGvD,kDAAkD;;IAGlD,wEAAwE;;IAGxE,uEAAuE;;CAE/D,CAAC;AAMX;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,iCAAiC,CAAC;AAElE;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,yBAAyB,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAe,CAAC;AAEzE;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,cAAc;IACzB,kDAAkD;;IAGlD,4DAA4D;;IAG5D,4DAA4D;;CAEpD,CAAC;AAMX;;;;;;GAMG;AACH,eAAO,MAAM,YAAY;IACvB,6CAA6C;;IAG7C,6CAA6C;;CAErC,CAAC"}
@@ -11,10 +11,9 @@
11
11
  *
12
12
  * @module core/base-provider-llm
13
13
  */
14
+ import type { BaseLlmConnection, LlmRequest, LlmResponse } from "@google/adk";
14
15
  import { BaseLlm } from "@google/adk";
15
- import type { LlmRequest, LlmResponse, BaseLlmConnection } from "@google/adk";
16
16
  import type { BaseProviderConfig } from "../types";
17
- declare const BASE_MODEL_SYMBOL: unique symbol;
18
17
  /**
19
18
  * Abstract base class for all LLM providers in adk-llm-bridge.
20
19
  *
@@ -46,7 +45,6 @@ declare const BASE_MODEL_SYMBOL: unique symbol;
46
45
  * @see {@link OpenAICompatibleLlm} for OpenAI-compatible API implementations
47
46
  */
48
47
  export declare abstract class BaseProviderLlm extends BaseLlm {
49
- readonly [BASE_MODEL_SYMBOL]: true;
50
48
  /**
51
49
  * Provider configuration.
52
50
  *
@@ -109,5 +107,4 @@ export declare abstract class BaseProviderLlm extends BaseLlm {
109
107
  */
110
108
  protected createErrorResponse(error: unknown, prefix: string): LlmResponse;
111
109
  }
112
- export {};
113
110
  //# sourceMappingURL=base-provider-llm.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"base-provider-llm.d.ts","sourceRoot":"","sources":["../../src/core/base-provider-llm.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;GAOG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC9E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAKnD,OAAO,CAAC,MAAM,iBAAiB,EAAE,OAAO,MAAM,CAAC;AAE/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,8BAAsB,eAAgB,SAAQ,OAAO;IAEnD,SAAiB,CAAC,iBAAiB,CAAC,EAAE,IAAI,CAAC;IAE3C;;;;;;OAMG;IACH,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,kBAAkB,CAAC;IAE9C;;;;OAIG;gBACS,MAAM,EAAE,kBAAkB;IAKtC;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,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37
37
  */
38
38
  export { BaseProviderLlm } from "./base-provider-llm";
39
- export { OpenAICompatibleLlm } from "./openai-compatible-llm";
40
39
  export type { OpenAIClientConfig } from "./openai-compatible-llm";
40
+ export { OpenAICompatibleLlm } from "./openai-compatible-llm";
41
41
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,YAAY,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,YAAY,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC"}
@@ -11,10 +11,10 @@
11
11
  *
12
12
  * @module core/openai-compatible-llm
13
13
  */
14
- import OpenAI from "openai";
15
14
  import type { LlmRequest, LlmResponse } from "@google/adk";
16
- import { BaseProviderLlm } from "./base-provider-llm";
15
+ import OpenAI from "openai";
17
16
  import type { BaseProviderConfig } from "../types";
17
+ import { BaseProviderLlm } from "./base-provider-llm";
18
18
  /**
19
19
  * Configuration for the underlying OpenAI client.
20
20
  *
@@ -1 +1 @@
1
- {"version":3,"file":"openai-compatible-llm.d.ts","sourceRoot":"","sources":["../../src/core/openai-compatible-llm.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;GAOG;AAEH,OAAO,MAAM,MAAM,QAAQ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-llm-bridge|GitHub Repository}
58
58
  * @see {@link https://google.github.io/adk-docs/|Google ADK Documentation}
59
59
  */
60
+ export { BaseLlm } from "@google/adk";
60
61
  export { BaseProviderLlm } from "./core/base-provider-llm";
61
- export { OpenAICompatibleLlm } from "./core/openai-compatible-llm";
62
62
  export type { OpenAIClientConfig } from "./core/openai-compatible-llm";
63
- export { AIGatewayLlm } from "./providers/ai-gateway";
64
- export { AIGateway } from "./providers/ai-gateway";
65
- export { registerAIGateway, isAIGatewayRegistered, } from "./providers/ai-gateway";
66
- export { OpenRouterLlm } from "./providers/openrouter";
67
- export { OpenRouter } from "./providers/openrouter";
68
- export { registerOpenRouter, isOpenRouterRegistered, } from "./providers/openrouter";
69
- export type { BaseProviderConfig, AIGatewayConfig, RegisterOptions, OpenRouterConfig, OpenRouterProviderPreferences, OpenRouterRegisterOptions, ToolCallAccumulator, StreamAccumulator, StreamChunkResult, } from "./types";
70
- export { MODEL_PATTERNS, DEFAULT_BASE_URL, OPENROUTER_BASE_URL, OPENROUTER_MODEL_PATTERNS, PROVIDER_IDS, } from "./constants";
71
- export { setProviderConfig, getProviderConfig, resetProviderConfig, resetAllConfigs, setConfig, getConfig, resetConfig, } from "./config";
63
+ export { OpenAICompatibleLlm } from "./core/openai-compatible-llm";
64
+ export { AIGateway, AIGatewayLlm, isAIGatewayRegistered, registerAIGateway, } from "./providers/ai-gateway";
65
+ export { isOpenRouterRegistered, OpenRouter, OpenRouterLlm, registerOpenRouter, } from "./providers/openrouter";
66
+ export { isOpenAIRegistered, OpenAI, OpenAILlm, registerOpenAI, } from "./providers/openai";
67
+ export { isXAIRegistered, registerXAI, XAI, XAILlm } from "./providers/xai";
68
+ export { Anthropic, AnthropicLlm, isAnthropicRegistered, registerAnthropic, } from "./providers/anthropic";
69
+ export { Custom, CustomLlm, type CustomLlmProviderConfig, createCustomLlm, } from "./providers/custom";
70
+ export type { AIGatewayConfig, AnthropicProviderConfig, AnthropicRegisterOptions, BaseProviderConfig, CustomLlmConfig, OpenAIProviderConfig, OpenAIRegisterOptions, OpenRouterConfig, OpenRouterProviderPreferences, OpenRouterRegisterOptions, RegisterOptions, StreamAccumulator, StreamChunkResult, ToolCallAccumulator, XAIProviderConfig, XAIRegisterOptions, } from "./types";
71
+ export { DEFAULT_BASE_URL, MODEL_PATTERNS, OPENROUTER_BASE_URL, OPENROUTER_MODEL_PATTERNS, PROVIDER_IDS, } from "./constants";
72
+ export { getConfig, getProviderConfig, resetAllConfigs, resetConfig, resetProviderConfig, setConfig, setProviderConfig, } from "./config";
72
73
  export { convertRequest } from "./converters/request";
73
74
  export { convertResponse, convertStreamChunk, createStreamAccumulator, } from "./converters/response";
74
75
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AAMH,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,YAAY,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAMvE,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EACL,iBAAiB,EACjB,qBAAqB,GACtB,MAAM,wBAAwB,CAAC;AAMhC,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EACL,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,wBAAwB,CAAC;AAMhC,YAAY,EAEV,kBAAkB,EAElB,eAAe,EACf,eAAe,EAEf,gBAAgB,EAChB,6BAA6B,EAC7B,yBAAyB,EAEzB,mBAAmB,EACnB,iBAAiB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