# AGENTS

## 项目对接指令

供 Codex 阅读；请合并到已有项目规则，真实密钥不要写进本文。完整中文说明：https://u9ai.ai/zh-CN/docs/codex.md

## U9 AI integration instructions for Codex

Merge these instructions into existing project rules; do not replace them. This file is project guidance, not authentication configuration.

- Read the complete guide: https://u9ai.ai/en/docs/codex.md and API boundaries: https://u9ai.ai/en/docs/api.md.
- Target only the U9 AI API origin https://u9ai.ai. OpenAI-compatible base URL: https://u9ai.ai/v1. Claude Code gateway root: https://u9ai.ai.
- Require an actually available model verified for Responses API, streaming and tool calls. Never invent model IDs or claim all models are compatible.
- Obtain the user's tool version and non-secret desired model ID. Use the guide matching the installed version. Explain missing upstream capabilities before changing configuration.
- Use environment-variable references for credentials. Never write real credentials in this file, source code, logs or tickets. Do not inspect existing secret files to populate examples.
- Preserve existing user configuration. Use an isolated Codex profile or session-local Claude variables, and document how to restore prior behavior.
- First verify GET https://u9ai.ai/v1/models using the locally supplied key. This checks discovery only. Do not report generation as tested based on this request.
- Only run paid generation tests within the user's authorized scope. Start small; check streaming and a full tool-call round trip, then request history and settled charges.
- Save request/task IDs without credentials. Do not blindly retry creation after a timeout; check the existing task first.
- Deliver changed file paths, commands with placeholders, validation evidence and any untested limitations. Do not bypass the tool's approval or permission settings.
