Check Opencode Free Models
🌐 English · Türkçe
check-opencode-free-models is a tiny tool that keeps the free chat
models published by the OpenCode Console in sync with
~/.config/opencode/opencode.jsonc.
It fetches https://opencode.ai/inference/v1/models (no auth), filters free
chat models, compares them against provider.opencode-api.models, reports drift
(added / removed), and — with --apply — rewrites the block in place
after taking a timestamped backup.
Source & references
- Free models documentation: https://opencode.ai/docs/models/#free-models
- OpenCode Desktop: https://opencode.ai/desktop
- Live endpoint used by the script:
https://opencode.ai/inference/v1/models(no auth;cost.text.input.price == 0 && cost.text.output.price == 0andtype == "chat").
What gets pulled from where
| Source | What | Target |
|---|---|---|
https://opencode.ai/inference/v1/models (no auth) |
Free chat models (type == "chat", cost.text.input/output.price == 0) — id + name |
~/.config/opencode/opencode.jsonc → provider.opencode-api.models |
| Existing config | Preserves already-stored name values on update |
merged into the rewritten block |
--apply |
Rewrites the block; backup opencode.jsonc.bak-YYYY-MM-DD-HH_MM_SS |
same file |
Nothing else is read or written. The example config
opencode-free-models.config.example.jsonc shows the shape of the opencode-api
block (redacted, no secrets).
Current free chat models
As of 2026-11-20, the Console lists 11 free chat models (run the script to refresh):
beam-free— Beam Freebig-pickle— Big Pickledeepseek-v4.1-flash-free— DeepSeek V4.1 Flash Freeflint-40b-free— Flint 40B Freehy4-flash-free— Hy4 flash Freeiceman-free— Iceman Freelongcat-2.5-free— LongCat 2.5 Freemimo-v2.6-flash-free— MiMo-V2.6-Flash Freenemotron-3.5-lightning-free— Nemotron 3.5 Lightning Freenemotron-3.5-super-vl-free— Nemotron 3.5 Super VL Freetidepool-alpha-free— Tidepool Alpha Free
How it works
- Fetch —
fetch_free_ids()reads every model from the source endpoint. Filter:cost.text.input.price == 0 && cost.text.output.price == 0andtype == "chat".- Decision models (
type: decision, e.g. Jevjev-1.13-free) are not chat (recommended_api: systemone), so they are never written to theopencode-apiblock.
- Decision models (
- Drift —
read_config_models()reads theid -> namemap fromprovider.opencode-api.models. Diff against the live free list:added,removed. - Apply — with
--apply:- Backup
opencode.jsonc.bak-YYYY-MM-DD-HH_MM_SS(shutil.copy2, metadata preserved). build_block()joins lines with commas (no trailing comma).pattern.subnrewrites theopencode-apimodels block.- Validate-before-write: the rewritten text is parsed with
json.loads(new_text)before the file is touched; on failure the config is left untouched.
- Backup
Idempotent: re-running --apply reports no drift.
Usage
python3 check-opencode-free-models.py # drift report (exit 0: in sync, 1: drift)
python3 check-opencode-free-models.py --apply # update, with backup
Example output:
canlı ücretsiz sohbet modeli: 11
config'deki model : 11
eklenecek : -
kaldırılacak: -
SONUÇ: güncel, fark yok.
OpenCode Desktop and crontab
This tool targets OpenCode Desktop's own
~/.config/opencode/opencode.jsonc — it never touches any other config file.
Apply updates automatically with --apply, or run a daily drift check from
crontab:
0 6 * * * /path/to/check-opencode-free-models/check-opencode-free-models.py
Exit code 1 on drift (SONUÇ: drift var. --apply ile güncelle.), 0 when
in sync (SONUÇ: güncel, fark yok.).
Files
| File | Description |
|---|---|
check-opencode-free-models.py |
Working script (live endpoint, drift, apply + backup). |
opencode-free-models.config.example.jsonc |
Example opencode-api block (redacted, no secrets). |
README.md |
This file (English). |
README.tr.md |
Turkish tour. |
CHANGELOG.md |
Release history. |
CONTRIBUTING.md |
Development setup and checks. |
LICENSE |
MIT. |
Project structure
check-opencode-free-models/
├── check-opencode-free-models.py
├── opencode-free-models.config.example.jsonc
├── README.md
├── README.tr.md
├── CHANGELOG.md
├── CONTRIBUTING.md
├── LICENSE
├── .gitignore
└── docs/
└── README.md
Testing & CI
There is no automated test suite yet. Before a change:
python3 -m py_compile check-opencode-free-models.py— syntax.python3 check-opencode-free-models.py— drift report (exit0when in sync).
Documentation
README.tr.md— Turkish tour.docs/README.md— documentation map.CHANGELOG.md— release history.CONTRIBUTING.md— development setup.
Future ideas
- Atomic write —
tempfile+os.replaceafter validation. - Robust
typefilter —m.get("type") or "chat". - Decision-model WARN — report skipped
type=decisionmodels. - Unit tests — make
ENDPOINT/CONFIGenv-overridable and mockurllib. --dry-runalias.recommended_apirouting — systemone endpoint is currently 404.
License
MIT — see LICENSE.
Metadata
Release files for check-opencode-free-models 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| check_opencode_free_models-1.0.2.tar.gz | 9.1 kB | Without provenance | Details for check_opencode_free_models-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| check_opencode_free_models-1.0.2-py3-none-any.whl | Python 3 | none | any | Details for check_opencode_free_models-1.0.2-py3-none-any.whl |
Total release size: 16.3 kB
Release files / check_opencode_free_models-1.0.2.tar.gz
| Download URL | check_opencode_free_models-1.0.2.tar.gz |
|---|---|
| Size | 9.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ea47ba66c16d85d2732f1a7b26e3f746a7f4d096bc350ab2ace01946789f8b52
|
|
BLAKE2b-256 checksum How to use checksums |
ff523609cd51551c4fab0d80165d399eea809e17885e8546807a7ac24a1b5bad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.15.2
|
Release files / check_opencode_free_models-1.0.2-py3-none-any.whl
| Download URL | check_opencode_free_models-1.0.2-py3-none-any.whl |
|---|---|
| Size | 7.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
45ef7101ce3c858cd29db9574ae054c5380ae43d26295be3c70c5bced9a067ad
|
|
BLAKE2b-256 checksum How to use checksums |
fb3d2e55b6bfa757c3523f6757febc95fe1f80c834cdef5e741179ad05ca3512
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.15.2
|
Security for check-opencode-free-models 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.