Fireworks AI 的工作原理
Fireworks AI 是生成式 AI 最快的推理平台,旨在在几秒钟内构建和运行神奇的 AI 应用。该平台提供对流行开源模型(如 DeepSeek、Llama、Qwen 和 Mistral)的无服务器访问,具有优化的速度、高吞吐量和最小延迟。专为需要可靠、极快 AI 基础设施而无需 GPU 管理复杂性的开发者而构建。推荐模型
我们推荐具有有竞争力定价和高上下文窗口的优秀编码模型。如需最新信息,请访问 Fireworks AI 的定价页面。
| 模型 | 定价(100万令牌) | 上下文窗口 |
|---|---|---|
Llama 4 Maverick 推荐 | 0.88 | ~131k 令牌 |
| Llama 4 Scout | 0.60 | ~131k 令牌 |
| DeepSeek V3 | $0.90 | ~128k 令牌 |
| Qwen3 235B | 0.88 | ~131k 令牌 |
创建 API 密钥
直接访问 Fireworks AI 控制台创建新的 API 密钥。 或者,按照以下步骤操作:- 访问 app.fireworks.ai 并创建账户或登录
- 登录后,导航到您的账户设置中的 API Keys 页面
- 点击 “Create API Key” 按钮
- 为您的密钥提供一个描述性名称(例如,‘Kodus’或您偏好的任何名称)
- 点击 “Create” 生成密钥
- 立即复制 API 密钥并将其保存在安全的地方 - 您将无法再次查看它
新账户附带 $1 的免费信用额度,可开始使用您的项目。
如何使用
系统要求
Recommended Hardware
Recommended Hardware
- CPU: 2+ cores - RAM: 8GB+ - Storage: 60GB+ free space
Required Software
Required Software
- Docker (latest stable version)
- Node.js (latest LTS version)
- Yarn or NPM (latest stable version)
- Domain name or fixed IP (for external deployments)
Required Ports
Required Ports
- 3000: Kodus Web App
- 3001: API
- 3332: Webhooks
- 5672, 15672, 15692: RabbitMQ (AMQP, management, metrics)
- 3101: MCP Manager (API, metrics)
- 5432: PostgreSQL - 27017: MongoDB
如果您计划连接云端 Git 服务(GitHub、GitLab、Bitbucket)或云端 LLM 提供商(OpenAI、Anthropic 等),则需要互联网访问。 对于内网自托管的 Git 工具和本地/自托管 LLM,外网访问是可选的。
域名设置(可选)
If you're planning to integrate Kodus with cloud-based Git providers (GitHub, GitLab, or Bitbucket), you'll need public-facing URLs for both the Kodus Web App and its API. This allows your server to receive webhooks for proper Code Review functionality and ensures correct application behavior. We recommend setting up two subdomains:- One for the Web Application, e.g.,
kodus-web.yourdomain.com. - One for the API, e.g.,
kodus-api.yourdomain.com.
- 使用独立的 webhook 子域名,例如
kodus-webhooks.yourdomain.com,或 - 继续使用 API 域名,并在反向代理中将
/github/webhook、/gitlab/webhook等路径转发到 webhook 服务。
Note: If you're only connecting to self-hosted Git tools on your network and do not require public access or webhooks, you might be able to use a simpler setup, but this guide focuses on public-facing deployments.
Setup
Edit the environment file
Success 🎉
When complete, Kodus Services should be running on your machine.
You can verify your installation using the following script:
Access the web interface
Once you access the web interface for the first time, you'll need to:
- Create your admin account - This will be the first user with full system access
- Configure your Git provider - Connect GitHub, GitLab, or Bitbucket following the on-screen instructions
- Select repositories for analysis - Choose which code repositories Kody will review
详细步骤请参见 快速开始指南。
在环境文件中配置 Fireworks AI
编辑您的.env 文件并配置核心设置。对于 LLM 集成,在固定模式下使用 Fireworks AI:
Webhook URL 必须指向 Webhooks 服务(端口 3332)。您可以使用独立的 webhook 域名,或在反向代理中将
/.../webhook 转发到 3332 端口。固定模式非常适合 Fireworks AI,因为它提供兼容 OpenAI 的 API,具有极快的推理速度,并可访问尖端的开源模型,设置时间为零。
Run the Installation Script
Set the proper permissions for the installation script:What the Installer Does
Our installer automates several important steps:- Verifies Docker installation
- Creates networks for Kodus services
- Clones repositories and configures environment files
- Runs docker-compose to start all services
- Executes database migrations
- Seeds initial data
http://localhost:3000 - you should see the Kodus Web Application interface.
设置反向代理(用于生产环境)
对于 Webhook 和外部访问,配置 Nginx:验证 Fireworks AI 集成
除了基本的安装验证外,确认 Fireworks AI 正常工作:故障排除
API 密钥问题
API 密钥问题
- 在 Fireworks AI 控制台中验证您的 API 密钥是否正确且处于活动状态
- 检查您的 Fireworks AI 账户中是否有足够的信用额度
- 确保您的
.env文件中没有多余的空格 - 新账户会收到 $1 的免费信用额度以开始使用
模型未找到
模型未找到
- 检查配置中的模型名称拼写是否正确
- 验证该模型在 Fireworks AI 当前的模型库中是否可用
- 尝试使用我们推荐列表中的其他模型
- 查看 Fireworks AI 模型文档
连接错误
连接错误
- 验证您的服务器是否有互联网访问权限以访问
api.fireworks.ai - 检查是否有任何防火墙限制
- 查看 API/worker 日志以获取详细的错误消息
- 确保您使用的是正确的 API 端点
性能问题
性能问题
- Fireworks AI 提供业界领先的速度和最小延迟
- 检查您的网络连接以获得最佳性能
- 考虑将专用部署用于企业工作负载
- 监控您的使用模式以优化 API 调用
速率限制
速率限制
- Fireworks AI 在无服务器基础设施上提供高速率限制
- 在 Fireworks AI 控制面板中检查您当前的使用情况
- 考虑升级到专用部署以获得更高的吞吐量
- 联系 Fireworks AI 支持以进行企业速率限制调整