Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion src/content/docs-es/codex.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,19 @@ Ojo con el nombre: Codex quiere "un nombre simple" y **rechaza los puntos**, as

El resto del `config.toml` (tu proveedor, tus MCP, tus permisos) sigue aplicando; el perfil solo pisa lo que nombra. El [CLI de NaN](/es/docs/nan-cli) los escribe por ti, uno por cada modelo de chat del clúster, con el prefijo `nan-` y sin los puntos: `nan-glm53-flash`, `nan-deepseek-v4-flash`, `nan-mimo-v26-flash`, `nan-qwen36`... Al desconectar Codex se los lleva.

### Cambiar dentro de la sesión con `/model`

Por sí solo, `/model` en una sesión de NaN enseña solo los modelos de OpenAI, y el clúster contesta a todos con un `401`: Codex llena el selector con el catálogo de OpenAI y no sabe leer el `/v1/models` del clúster como uno. Un fichero de catálogo propio lo arregla. Desde la v0.1.31 el CLI de NaN escribe `~/.codex/nan-models.json` con los modelos de chat del clúster, cada uno con su ventana, y hace que los perfiles `nan-` lo apunten:

```toml
# en cada ~/.codex/nan-*.config.toml
model_catalog_json = "C:/Users/tu-usuario/.codex/nan-models.json"
```

Arranca con cualquiera de ellos, `codex --profile nan-glm53-flash`, y `/model` te enseña todos los modelos de NaN; eliges otro y la sesión sigue con él, con la ventana de ese modelo. Va en los perfiles y no en `config.toml` porque un catálogo sustituye al de OpenAI: ahí les quitaría sus modelos a tus sesiones de OpenAI.

Lo que no puede es mezclar los dos. El proveedor es fijo para toda la sesión, así que pasar de un modelo de OpenAI a uno de NaN, o al revés, es relanzar: `codex` a secas para OpenAI, `codex --profile nan-...` para NaN. `codex resume --profile nan-glm53-flash` retoma una conversación anterior con un modelo de NaN.

## Modelo recomendado

`glm5.3-flash` para trabajo de código. Si tienes el tier premium, `glm5.3`. Para preguntas sueltas que no tocan ficheros, `deepseek-v4-flash` va sobrado.
Expand All @@ -97,7 +110,7 @@ El resto del `config.toml` (tu proveedor, tus MCP, tus permisos) sigue aplicando
- **`model_context_window` repetida.** Las versiones del CLI de NaN anteriores a la 0.1.20 la añadían al final del fichero en cada pasada del setup. Dos son una clave duplicada y Codex no carga el fichero: la CLI dice `duplicate key` y la app abre un diálogo de error y nada más. La 0.1.20 deja una sola y la pone donde se lee.
- **`401 This API key does not have access to the requested model`.** Pese al mensaje, la clave suele estar bien: el modelo es uno que el clúster no sirve. O el `model_provider` apunta al clúster pero el `model` sigue siendo de OpenAI, o el modelo se ha retirado: `mimo-v2.5` ahora es `mimo-v2.6-flash`. Comprueba el id en [Modelos](/es/docs/models). El CLI de NaN 0.1.30 cambia el perfil `nan-mimo-v25` por `nan-mimo-v26-flash` la próxima vez que pases por su Setup.
- **Con `qwen3.6` y `gemma4` la respuesta sigue llegando de golpe** al final del turno. No es un cuelgue: con esos dos el `/responses` del clúster retiene la respuesta hasta tenerla completa. El resto de modelos la va emitiendo según se escribe.
- **`Model metadata for ... not found. Defaulting to fallback metadata`** en cada turno. Es ruido: Codex lo imprime antes de leer tu `model_context_window`, y la ventana que acaba usando es la tuya.
- **`Model metadata for ... not found. Defaulting to fallback metadata`** en cada turno. Significa que Codex no tiene ese modelo en su catálogo, y no hace daño: lo imprime antes de leer tu `model_context_window`, y la ventana que acaba usando es la tuya. Con el catálogo de arriba (CLI de NaN 0.1.31) deja de salir.

</Details>

15 changes: 14 additions & 1 deletion src/content/docs/codex.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,19 @@ Mind the name: Codex wants "a plain name" and **rejects dots**, so `qwen3.6` is

The rest of your `config.toml` - your provider, your MCP servers, your permissions - still applies; the profile only overrides what it names. The [NaN CLI](/docs/nan-cli) writes them for you, one per chat model on the cluster, prefixed `nan-` and with the dots dropped: `nan-glm53-flash`, `nan-deepseek-v4-flash`, `nan-mimo-v26-flash`, `nan-qwen36`... Disconnecting Codex takes them away again.

### Switching inside a session with `/model`

On its own, `/model` in a NaN session lists only OpenAI's models, and the cluster answers every one of them with a `401`: Codex fills the picker from OpenAI's catalogue and cannot read the cluster's `/v1/models` as one. A catalogue file of your own fixes that. From v0.1.31 the NaN CLI writes `~/.codex/nan-models.json` with the cluster's chat models, each with its window, and points the `nan-` profiles at it:

```toml
# in each ~/.codex/nan-*.config.toml
model_catalog_json = "C:/Users/you/.codex/nan-models.json"
```

Start with any of them, `codex --profile nan-glm53-flash`, and `/model` then lists every NaN model; pick another and the session carries on with it, at that model's window. It goes in the profiles and not in `config.toml` because a catalogue replaces OpenAI's: there it would take their models out of your OpenAI sessions.

What it cannot do is mix the two. The provider is fixed for the whole session, so going from an OpenAI model to a NaN one, or back, is a relaunch: `codex` on its own for OpenAI, `codex --profile nan-...` for NaN. `codex resume --profile nan-glm53-flash` picks up an earlier conversation with a NaN model.

## Recommended model

`glm5.3-flash` for coding work. If you have the premium tier, `glm5.3`. For one-off questions that do not touch files, `deepseek-v4-flash` is more than enough.
Expand All @@ -97,6 +110,6 @@ The rest of your `config.toml` - your provider, your MCP servers, your permissio
- **A repeated `model_context_window`.** NaN CLI versions before 0.1.20 appended one at the end of the file on every setup run. Two of them is a duplicate key and Codex will not load the file: the CLI says `duplicate key` and the desktop app opens an error dialog and nothing else. 0.1.20 leaves one and puts it where it is read from.
- **`401 This API key does not have access to the requested model`.** Despite the wording, the key is usually fine: the model is one the cluster does not serve. Either `model_provider` points at the cluster but `model` is still an OpenAI one, or the model has been retired - `mimo-v2.5` is now `mimo-v2.6-flash`. Check the id against [Models](/docs/models). NaN CLI 0.1.30 swaps the `nan-mimo-v25` profile for `nan-mimo-v26-flash` the next time you run its Setup.
- **On `qwen3.6` and `gemma4` the answer still arrives all at once** at the end of the turn. It is not a hang: on those two the cluster's `/responses` holds the answer until it is complete. Every other model streams it as it is written.
- **`Model metadata for ... not found. Defaulting to fallback metadata`** on every turn. It is noise: Codex prints it before it reads your `model_context_window`, and the window it ends up using is yours.
- **`Model metadata for ... not found. Defaulting to fallback metadata`** on every turn. It means Codex has no catalogue entry for the model, and it is harmless: it prints it before it reads your `model_context_window`, and the window it ends up using is yours. With the catalogue above (NaN CLI 0.1.31) it no longer appears.

</Details>
Loading