Privacy settings

Privacy and GDPR notice

Nfero uses essential storage for language preferences and demo access controls. With your consent, Google Analytics and lightweight usage events help improve model demos and outbound subscription routing. Live demo prompts may be sent to configured Alibaba-hosted model endpoints.

Tool + model pairing

Codex with Alibaba Coding Plan and Token Plan

Command-line programming tool from OpenAI that can sit in the same buyer conversation as Alibaba-compatible coding tools.

Codex can connect to Alibaba Model Studio through a custom provider in `~/.codex/config.toml`. Compatibility depends on both the model API and Codex version: Alibaba documents current Codex support through the Responses API for selected Qwen Token Plan models.

Choose the right access route

Choose the right access route

Use Token Plan with a current Codex release and a Responses-compatible Qwen model. Alibaba currently instructs Coding Plan users, and users choosing other Chat/Completions-only models, to install an older Codex version such as 0.80.0—review that tradeoff before subscribing for Codex alone.

RecommendedToken Plan is the cleaner current-Codex route

Token Plan (Team Edition)

Best with a current Codex release and qwen3.7-max, qwen3.7-plus, qwen3.6-plus, or qwen3.6-flash through the Responses API.

Coding Plan

Alibaba's current guide says Coding Plan only supports Chat/Completions here and instructs Codex users to install an older release such as 0.80.0.

Pay-as-you-go Model Studio API

Use for production/API workloads or when a supported pay-as-you-go model and region better match your application requirements.

Safe configuration pattern

Configure a Responses-compatible Token Plan provider

The example is deliberately redacted. Replace placeholders only on your device and never paste a real API key into Nfero.

Before you start

  1. Install Node.js 18 or later and verify `codex --version`.
  2. Choose a model whose API is compatible with the Codex version you plan to run.
  3. Get the dedicated Token Plan or Coding Plan key; set it as an environment variable rather than writing it into TOML.
  4. Back up `~/.codex/config.toml` before replacing an existing OpenAI or custom provider.

Safe configuration pattern

Protocol
OpenAI Responses API
Configuration path
~/.codex/config.toml
  1. Set the real dedicated key in `OPENAI_API_KEY` on your device; do not write it into the file below.
  2. Choose one of Alibaba's documented Responses-compatible Qwen models for a current Codex release.
  3. Add the custom provider and use the Token Plan base URL.
  4. Open a new terminal and run `codex` to test the configuration.
toml
model_provider = "Model_Studio_Token_Plan"
model = "qwen3.7-plus"

[model_providers.Model_Studio_Token_Plan]
name = "Model_Studio_Token_Plan"
base_url = "https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1"
env_key = "OPENAI_API_KEY"
wire_api = "responses"

# Set locally; never paste the real value into this file or Nfero:
# OPENAI_API_KEY=YOUR_TOKEN_PLAN_API_KEY

Verify the connection

  • Open a new terminal so `OPENAI_API_KEY` is available to Codex.
  • Run `codex --version` and confirm it matches the API route you configured.
  • Start `codex` and use a small read-only repository question first.
  • If a provider switcher reports a failed health check, test Codex itself; Alibaba notes that some probe formats can fail even when real requests work.

Model pairings

Recommended starting models

Use this tool to run interactive coding, reasoning, review, and documentation tasks with each model. Confirm final model availability and exact plan support in Alibaba Cloud before production use.

Text generationReasoningVisual understanding
Best pairing angle

Responses-compatible under Token Plan and a balanced current coding/reasoning route.

Text generationReasoning
Best pairing angle

Responses-compatible Token Plan flagship for difficult reasoning and repository tasks.

Text generationReasoningVisual understanding
Best pairing angle

Responses-compatible Token Plan alternative for long-context work.

Common problems

Common problems

What you see

400 Bad request or a provider switcher says domestic models are unsupported

Likely cause

A third-party switcher's health-check request differs from the request Codex sends.

What to do

Test from Codex directly before rejecting the provider; the failed probe may not indicate an actual compatibility problem.

What you see

Responses API or wire-protocol error

Likely cause

The chosen model only supports Chat/Completions, or the Codex version expects Responses.

What to do

Use a documented Responses-compatible Qwen model with current Codex, or follow Alibaba's older-version guidance for Chat/Completions-only routes.

What you see

401 or missing API key

Likely cause

`OPENAI_API_KEY` is not available in the new shell or belongs to another Alibaba billing route.

What to do

Set the dedicated plan key in the environment, open a new terminal, and pair it with that plan's base URL.

What you see

Unexpected pay-as-you-go charges

Likely cause

The custom provider is using a general Model Studio endpoint/key instead of the plan-specific pair.

What to do

Inspect `model_provider`, `base_url`, and the environment variable source before running another task.

Important restrictions

  • Use the dedicated API key and base URL from the same Alibaba billing plan. Coding Plan, Token Plan, and general Model Studio credentials are not interchangeable.
  • Plan keys are for the assigned user in an interactive coding or agent tool. Do not share them, commit them to a repository, or expose them in screenshots.
  • Do not use a Coding Plan or Token Plan key for automated scripts, batch jobs, application backends, public services, or other non-interactive API workloads. Use pay-as-you-go Model Studio API access for those workloads.
  • Model availability is an exact-string allowlist and can change. Confirm the model ID in the current Alibaba plan documentation before editing a working configuration.