INNER CODE UNIT · Python
_codex_free_profile_active
browser-use/bux · agent/box_agent.py:251
def _codex_free_profile_active() -> bool:
"""True if config.toml selects the free DeepSeek profile as default.
The free path (ENG-4785) needs no `codex login` — the control plane holds
the credential, the box just routes to it. So "authed" for this box means
the top-level `profile = "browser-use-free"` line is present. Checked
before shelling out to `codex login status` so the free path reports
authed without a sign-in.
"""
try:
cfg = '/home/bux/.codex/config.toml'
with open(cfg, encoding='utf-8') as f:
for line in f:
stripped = line.strip()
if stripped.startswith('['):
# Top-level keys only — stop at the first table header.
break
if '=' in stripped: