[plugins] generate-responses.py declares Python >=3.10 but requires Python 3.12 f-string syntax
What issue are you seeing?
The Hugging Face Jobs example scriptgenerate-responses.py
declares:
# requires-python = ">=3.10"
However, the current file cannot be parsed by Python 3.10 or Python 3.11. It
uses a nested f-string containing a backslash inside an outer f-string
expression. That syntax is accepted by Python 3.12 but rejected by the earlier
versions allowed by the script metadata.
I reproduced this against openai/plugins commit11c74d6ba24d3a6d48f54a194cd00ef3beea18f9.
Results:
- Python 3.10.18:
SyntaxError: f-string expression part cannot include a backslash - Python 3.11.1:
SyntaxError: f-string expression part cannot include a backslash - Python 3.12.11: parses successfully
The parser reports the closing triple quote at line 165; the incompatible
expression is themax_model_len_used interpolation on line 163.
What steps can reproduce the bug?
- Check out
openai/pluginscommit
11c74d6ba24d3a6d48f54a194cd00ef3beea18f9.
- Run the following from the repository root:
$script = 'plugins/hugging-face/skills/jobs/scripts/generate-responses.py'
uv run --python 3.10 python -m py_compile $script
uv run --python 3.11 python -m py_compile $script
uv run --python 3.12 python -m py_compile $script
The first two commands fail during parsing. The Python 3.12 command succeeds.
No Hugging Face token, job submission, network service, or script dependency
installation is required to reproduce the parser failure.
What is the expected behavior?
A script that declares requires-python = ">=3.10" should parse on supported
Python 3.10 and 3.11 runtimes.
Either:
- rewrite the expression so it is valid on Python 3.10+, or
- change the script metadata to
requires-python = ">=3.12"if Python 3.12 is
intentionally required.
The compatibility-preserving option is small: compute the optional--max-model-len text before the outer multiline f-string and interpolate the
resulting variable. I tested that transformation in memory against the complete
source file; it parsed successfully on Python 3.10.18, 3.11.1, and 3.12.11.
Additional information
The
Jobs skill documents Python 3.12 as the default and shows Python 3.11 as a selectable version.
More importantly, the example script itself advertises Python 3.10 and later
through its PEP 723 metadata.
I searched all-state Issues and PRs in openai/codex and openai/plugins
on 2026-08-23 using these queries:
generate-responses Python 3.11generate-responses.pyrequires-python >=3.10 f-stringf-string expression part cannot include a backslashhugging-face jobs Python 3.10
I did not find an existing report or patch for this failure.
This is being filed in the main Codex tracker because openai/plugins has
Issues disabled. The official Open Source
page directs Codex bug reports and feature requests to theopenai/codex issue tracker.