-
Notifications
You must be signed in to change notification settings - Fork 616
docs(codex-app-models): document Desktop remote allowlist limitation (#241) #999
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -137,6 +137,23 @@ The featured-model list is separate from the Dashboard's **Sub-agent delegation* | |
| controls which overrides Codex offers first; it does not select a model or trigger delegation by | ||
| itself. | ||
|
|
||
| ## Desktop remote servers | ||
|
|
||
| Codex Desktop's remote-server mode filters the picker against the client's own | ||
| `available_models` allowlist (active when the remote `use_hidden_models` setting is on). Routed | ||
| catalog entries are still loaded and served - `model/list` returns them and the bundled CLI reads | ||
| them - but the Desktop renderer drops anything that is not on that native-only allowlist before | ||
| rendering. opencodex has no hook into that list; the upstream bug is tracked at | ||
| [openai/codex#19694](https://github.com/openai/codex/issues/19694). | ||
|
|
||
| Until Desktop exposes a control for the allowlist: | ||
|
|
||
| - Set the model directly in `~/.codex/config.toml` on the remote machine, for example | ||
| `model = "input/grok-4.5"`. The picker may show `Custom`, but requests still use the configured | ||
| routed model. | ||
|
Comment on lines
+151
to
+153
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
# Verify whether `input` is an actual provider and whether the example resolves.
rg -n \
'input/grok-4\.5|xai/grok-4\.5|cursor/grok-4\.5|["'\'']input["'\'']|provider.*input' \
.Repository: lidge-jun/opencodex Length of output: 50375 🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
printf '%s\n' '--- affected documentation ---'
for f in \
docs-site/src/content/docs/guides/codex-app-models.md \
docs-site/src/content/docs/ja/guides/codex-app-models.md \
docs-site/src/content/docs/ko/guides/codex-app-models.md \
docs-site/src/content/docs/ru/guides/codex-app-models.md \
docs-site/src/content/docs/zh-cn/guides/codex-app-models.md
do
echo "### $f"
rg -n -C 4 'input/grok-4\.5|model directly|モデルを直接|직접 설정|напрямую|直接设置' "$f"
done
printf '%s\n' '--- routing and provider declarations ---'
fd -t f . src | sort | while read -r f; do
if rg -q 'routeModel|provider.*model|model.*provider|providers:' "$f"; then
echo "### $f"
rg -n -C 3 'routeModel|provider.*model|model.*provider|providers:' "$f" | head -160
fi
done
printf '%s\n' '--- exact input-provider evidence outside documentation/data fields ---'
rg -n --glob '!docs-site/**' --glob '!*.json' \
'(^|[^[:alnum:]_-])input/grok-4\.5([^[:alnum:]_.-]|$)|provider[[:space:]]*[:=][[:space:]]*["'\''`]input["'\''`]|["'\''`]input["'\''`][[:space:]]*:' \
src tests gui scripts || trueRepository: lidge-jun/opencodex Length of output: 50376 🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
printf '%s\n' '--- routeModel definition and call sites ---'
rg -l --glob '*.ts' 'export (async )?function routeModel|function routeModel|routeModel\s*=' src tests | sort
rg -n -C 8 --glob '*.ts' \
'export (async )?function routeModel|function routeModel|routeModel\s*=' \
src tests | head -240
printf '%s\n' '--- provider-name validation and config lookup ---'
rg -n -C 8 --glob '*.ts' \
'isValidProviderName|defaultProvider|config\.providers\[|providers\[provider|providers\[model' \
src tests | head -320
printf '%s\n' '--- provider registry entries ---'
rg -n -C 3 --glob '*.ts' --glob '*.json' \
'provider(Name|Id)?[[:space:]]*[:=].*(xai|cursor|input)|["'\''](xai|cursor|input)["'\'']' \
src tests | head -240
printf '%s\n' '--- exact example count in all affected locales ---'
python3 - <<'PY'
from pathlib import Path
files = [
Path("docs-site/src/content/docs/guides/codex-app-models.md"),
Path("docs-site/src/content/docs/ja/guides/codex-app-models.md"),
Path("docs-site/src/content/docs/ko/guides/codex-app-models.md"),
Path("docs-site/src/content/docs/ru/guides/codex-app-models.md"),
Path("docs-site/src/content/docs/zh-cn/guides/codex-app-models.md"),
]
for path in files:
text = path.read_text()
print(f"{path}: input/grok-4.5={text.count('input/grok-4.5')}, "
f"xai/grok-4.5={text.count('xai/grok-4.5')}, "
f"cursor/grok-4.5={text.count('cursor/grok-4.5')}")
PYRepository: lidge-jun/opencodex Length of output: 50375 🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
printf '%s\n' '--- complete routing branches ---'
sed -n '340,465p' src/router.ts
printf '%s\n' '--- routing tests for unknown namespaces and configured providers ---'
rg -n -C 8 --glob '*.test.ts' \
'No provider configured for model|routeModel\(.*\/|unknown.*provider|provider.*not configured|defaultProvider' \
tests | head -320
printf '%s\n' '--- provider/model documentation context ---'
for f in \
docs-site/src/content/docs/guides/providers.md \
docs-site/src/content/docs/reference/adapters.md \
docs-site/src/content/docs/guides/codex-app-models.md
do
echo "### $f"
rg -n -C 5 'provider/model|provider-qualified|direct|configured|xai/grok-4\.5|cursor/grok-4\.5|openai-chat|catalog' "$f" | head -220
done
printf '%s\n' '--- standalone route decision verifier ---'
python3 - <<'PY'
def route_decision(providers, default_provider, model_id):
slash = model_id.find("/")
if slash > 0:
namespace = model_id[:slash]
if namespace in providers:
return ("explicit-provider", namespace, model_id[slash + 1:])
if model_id.startswith(("gpt-", "o")):
if "openai" in providers:
return ("native-openai", "openai", model_id)
raise RuntimeError(f"no enabled OpenAI provider for {model_id}")
for name, provider in providers.items():
if provider.get("defaultModel") == model_id:
return ("provider-default", name, provider["defaultModel"])
if model_id in provider.get("models", []):
return ("provider-model-list", name, model_id)
if default_provider in providers:
return ("default-provider-fallback", default_provider, model_id)
raise RuntimeError(f"No provider configured for model: {model_id}")
configs = [
(
"xai configured, input absent",
{"xai": {"models": ["grok-4.5"]}},
"xai",
"input/grok-4.5",
),
(
"cursor configured, input absent",
{"cursor": {"models": ["grok-4.5"]}},
"cursor",
"input/grok-4.5",
),
(
"input explicitly configured",
{"input": {"models": ["grok-4.5"]}},
"input",
"input/grok-4.5",
),
]
for name, providers, default_provider, model_id in configs:
try:
print(name, "=>", route_decision(providers, default_provider, model_id))
except RuntimeError as exc:
print(name, "=> ERROR:", exc)
PYRepository: lidge-jun/opencodex Length of output: 50377 Use the configured provider/model identifier in all five locale workarounds.
Apply this change to 📍 Affects 5 files
🤖 Prompt for AI AgentsSource: Path instructions |
||
| - Use Codex CLI or TUI instead of the Desktop picker; they do not apply the allowlist and list | ||
| routed models normally. | ||
|
|
||
| ## Refreshing model state | ||
|
|
||
| If the picker still shows stale entries, refresh the catalog and restart the target Codex surface: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In a standard configuration,
inputis not a provider, so copying this workaround does not select a routed model:routeModelstrips a namespace only when it matches a configured provider, and otherwise may forward the entire invalidinput/grok-4.5string to the default provider. Use a real documented route such asxai/grok-4.5, or an explicit<provider>/<model>placeholder, and update the translated copies accordingly.AGENTS.md reference: docs-site/AGENTS.md:L10-L10
Useful? React with 👍 / 👎.