﻿---
title: "通过 Helicone 连接模型服务"
filename: "~/.codex/helicone.config.toml"
canonical: /templates/helicone-codex-gateway/
---

# 通过 Helicone 连接模型服务

用户层 [model_providers.helicone]，base_url 是 https://ai-gateway.helicone.ai/v1，wire_api = responses。env_key 读 HELICONE_API_KEY，不要再写 wire_api = chat。

```
export HELICONE_API_KEY=YOUR_HELICONE_API_KEY

# ~/.codex/config.toml
[model_providers.helicone]
name = "Helicone"
base_url = "https://ai-gateway.helicone.ai/v1"
env_key = "HELICONE_API_KEY"
wire_api = "responses"

# ~/.codex/helicone.config.toml
model_provider = "helicone"
model = "gpt-5"

codex --profile helicone

# 不要：
# wire_api = "chat"
# [profiles.helicone]
# openai_base_url = "https://ai-gateway.helicone.ai/v1"
# base_url = "https://gateway.helicone.ai/YOUR_HELICONE_API_KEY/v1/"
# plugin add helicone@
# $CODEX_HOME/.codex/config.toml

```
