经 AI Skill Hub 精选评估,开源AI工具:连接Google ADK TypeScript和Vercel AI Gateway和100+LLM模型 获评「推荐使用」。这款AI工具在功能完整性、社区活跃度和易用性方面表现出色,AI 评分 7.5 分,适合有一定技术背景的用户使用。
开源AI工具:连接Google ADK TypeScript和Vercel AI Gateway和100+LLM模型 是一款基于 TypeScript 开发的开源工具,专注于 adk-llm-bridge、typescript 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
开源AI工具:连接Google ADK TypeScript和Vercel AI Gateway和100+LLM模型 是一款基于 TypeScript 开发的开源工具,专注于 adk-llm-bridge、typescript 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
# 方式一:npm 全局安装 npm install -g adk-llm-bridge # 方式二:npx 直接运行(无需安装) npx adk-llm-bridge --help # 方式三:项目依赖安装 npm install adk-llm-bridge # 方式四:从源码运行 git clone https://github.com/pailat/adk-llm-bridge cd adk-llm-bridge npm install npm start
# 命令行使用
adk-llm-bridge --help
# 基本用法
adk-llm-bridge [options] <input>
# Node.js 代码中使用
const adk_llm_bridge = require('adk-llm-bridge');
const result = await adk_llm_bridge.run(options);
console.log(result);
# adk-llm-bridge 配置说明 # 查看配置选项 adk-llm-bridge --config-example > config.yml # 常见配置项 # output_dir: ./output # log_level: info # workers: 4 # 环境变量(覆盖配置文件) export ADK_LLM_BRIDGE_CONFIG="/path/to/config.yml"
Use any LLM with Google ADK TypeScript in just a few lines of code.
@google/adk >= 0.2.2bun add adk-llm-bridge @google/adk
pnpm add adk-llm-bridge @google/adk
npm install adk-llm-bridge @google/adk
import { LlmAgent } from '@google/adk';
import { AIGateway } from 'adk-llm-bridge';
const agent = new LlmAgent({
name: 'assistant',
model: AIGateway('anthropic/claude-sonnet-4'),
instruction: 'You are a helpful assistant.',
});
That's it. All ADK features work: tools, streaming, multi-agent, etc.
import { FunctionTool, LlmAgent } from '@google/adk';
import { Anthropic } from 'adk-llm-bridge';
import { z } from 'zod';
const getWeather = new FunctionTool({
name: 'get_weather',
description: 'Get current weather for a city',
parameters: z.object({
city: z.string().describe('City name'),
}),
execute: ({ city }) => {
return { status: 'success', weather: 'sunny', city };
},
});
const agent = new LlmAgent({
name: 'weather-assistant',
model: Anthropic('claude-sonnet-4-5'),
instruction: 'You help users check the weather.',
tools: [getWeather],
});
See the examples directory:
AI Gateway:
AI_GATEWAY_API_KEY=your-api-key
AI_GATEWAY_URL=https://ai-gateway.vercel.sh/v1 # optional
OpenRouter:
OPENROUTER_API_KEY=your-api-key
OPENROUTER_SITE_URL=https://your-site.com # optional, for ranking
OPENROUTER_APP_NAME=Your App Name # optional, for ranking
Direct Providers:
OPENAI_API_KEY=your-openai-key
ANTHROPIC_API_KEY=your-anthropic-key
XAI_API_KEY=your-xai-key
Pass options directly to the factory functions:
import { AIGateway, OpenRouter, Anthropic } from 'adk-llm-bridge';
// AI Gateway with custom URL
model: AIGateway('anthropic/claude-sonnet-4', {
apiKey: process.env.MY_API_KEY,
baseURL: 'https://my-gateway.example.com/v1',
})
// OpenRouter with site info
model: OpenRouter('anthropic/claude-sonnet-4', {
apiKey: process.env.OPENROUTER_API_KEY,
siteUrl: 'https://your-site.com',
appName: 'Your App',
})
// Anthropic with custom max tokens
model: Anthropic('claude-sonnet-4-5', {
apiKey: process.env.ANTHROPIC_API_KEY,
maxTokens: 8192,
})
AIGateway:
| Option | Type | Default | Description |
|---|---|---|---|
apiKey | string | process.env.AI_GATEWAY_API_KEY | API key |
baseURL | string | https://ai-gateway.vercel.sh/v1 | Gateway URL |
timeout | number | 60000 | Request timeout (ms) |
maxRetries | number | 2 | Max retry attempts |
**OpenRouter:
| Option | Type | Default | Description |
|---|---|---|---|
apiKey | string | process.env.OPENROUTER_API_KEY | API key |
baseURL | string | https://openrouter.ai/api/v1 | API URL |
siteUrl | string | process.env.OPENROUTER_SITE_URL | Your site URL (for ranking) |
appName | string | process.env.OPENROUTER_APP_NAME | Your app name (for ranking) |
provider | object | - | Provider routing preferences |
timeout | number | 60000 | Request timeout (ms) |
maxRetries | number | 2 | Max retry attempts |
**OpenAI:
| Option | Type | Default | Description |
|---|---|---|---|
apiKey | string | process.env.OPENAI_API_KEY | API key |
organization | string | process.env.OPENAI_ORGANIZATION | Organization ID |
project | string | process.env.OPENAI_PROJECT | Project ID |
timeout | number | 60000 | Request timeout (ms) |
maxRetries | number | 2 | Max retry attempts |
**Anthropic:
| Option | Type | Default | Description |
|---|---|---|---|
apiKey | string | process.env.ANTHROPIC_API_KEY | API key |
maxTokens | number | 4096 | Max tokens in response |
timeout | number | 60000 | Request timeout (ms) |
maxRetries | number | 2 | Max retry attempts |
**XAI:
| Option | Type | Default | Description |
|---|---|---|---|
apiKey | string | process.env.XAI_API_KEY | API key |
timeout | number | 60000 | Request timeout (ms) |
maxRetries | number | 2 | Max retry attempts |
**Custom:
| Option | Type | Default | Description |
|---|---|---|---|
model | string | - | Model name (required) |
baseURL | string | - | API base URL (required) |
name | string | "custom" | Provider name for logs/errors |
apiKey | string | - | API key for authentication |
headers | Record<string, string> | - | Additional HTTP headers |
queryParams | Record<string, string> | - | Query parameters for all requests |
providerOptions | Record<string, unknown> | - | Additional options for request body |
timeout | number | 60000 | Request timeout (ms) |
maxRetries | number | 2 | Max retry attempts |
You can also register providers with ADK's LLMRegistry to use string-based model names:
import { LlmAgent, LLMRegistry } from '@google/adk';
import { AnthropicLlm } from 'adk-llm-bridge';
LLMRegistry.register(AnthropicLlm);
const agent = new LlmAgent({
name: 'assistant',
model: 'claude-sonnet-4-5', // String-based model name
instruction: 'You are a helpful assistant.',
});
此项目是一个开源AI工具,连接Google ADK TypeScript和Vercel AI Gateway和100+LLM模型,提高开发效率和AI应用的可扩展性,但需要进一步优化和测试
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
AI Skill Hub 点评:开源AI工具:连接Google ADK TypeScript和Vercel AI Gateway和100+LLM模型 的核心功能完整,质量良好。对于AI 技术爱好者来说,这是一个值得纳入个人工具库的选择。建议先在非生产环境试用,再逐步推广。
| 原始名称 | adk-llm-bridge |
| 原始描述 | 开源AI工具:Connect Google ADK TypeScript to Vercel AI Gateway and 100+ LLM models。⭐10 · TypeScript |
| Topics | adk-llm-bridgetypescript |
| GitHub | https://github.com/pailat/adk-llm-bridge |
| License | MIT |
| 语言 | TypeScript |
收录时间:2026-05-22 · 更新时间:2026-05-23 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。