Kết nối AI agent local với WaveSpeed LLM
Chọn agent, chọn model WaveSpeed, copy đúng file cấu hình local và định tuyến request theo protocol mà agent yêu cầu.
~/.codex/config.toml
OpenAI Responses API
/v1/responses
Bắt đầu nhanh
Tạo access key WaveSpeed
Export key cần thiết ở máy local
Dán cấu hình vào~/.codex/config.toml
Chạy codex và kiểm tra Logs
Chat completions tương thích OpenAI
Mức sử dụng hiển thị trong Dashboard và Logs
Đổi model mà không phải viết lại code agent
# File: ~/.codex/config.toml
model = "deepseek/deepseek-v4-flash"
model_provider = "wavespeed"
[model_providers.wavespeed]
name = "WaveSpeed AI"
base_url = "https://llm.wavespeed.ai/v1"
env_key = "WAVESPEED_API_KEY"
wire_api = "responses"Đừng thay tên biến
WAVESPEED_API_KEY là tên biến môi trường mà agent đọc. Giữ nguyên tên này trong file cấu hình, và đặt API key thật trong shell.
Tạm thời cho terminal này
Hoạt động cho đến khi bạn đóng cửa sổ terminal này.
export WAVESPEED_API_KEY="wsk_live_..."Giữ sau khi khởi động lại
Ghi key vào shell profile để terminal mới có thể đọc được.
echo 'export WAVESPEED_API_KEY="wsk_live_..."' >> ~/.zshrc
source ~/.zshrc