github.com/replicate/cog
v0.22.0
#361 most downloaded on Go modules
replicate/cog
What this package is like to depend on
Last release 2 days ago
21 Aug 2026
Ships on a steady schedule
a new release about every 9 days
Rarely documented
notes for 7 of 152 stable releases
Nothing withdrawn
no release was ever pulled
5 years old
554 releases · first in 2021
163 releases in the last 12 months
see the full history below
Release timeline
554 releases · Mar 2021 to Aug 2026Releases
latest 60 of 554-
v0.22.1-0.20260821221655-6110c912377d21 Aug 2026 pre-releaseNothing published for this version
-
v0.22.013 Aug 2026Release notes
Open source →Breaking changes
- Local servers now bind to
127.0.0.1instead of0.0.0.0.cog serve,cog run -p,cog predict, andcog trainno longer expose the prediction endpoint to your whole network by default. To get the old behavior back, usecog serve --host 0.0.0.0orcog run -p 0.0.0.0:8888—-pnow acceptshost:port. (#2812)
New features
-
Browser playground.
cog playgroundstarts a local, schema-driven web UI for talking to a running model — a Postman-like tool that reads the model's OpenAPI schema and builds the input form for you, with a request inspector and webhook relay. Point it at anything speaking the Cog HTTP API with--target. (#3123) -
cog serve --playground. Serve the model and the playground in one command. The playground gets its own port (--playground-port, default 9000,0picks a free one) and both URLs are printed on startup. (#3154) -
@cog.concurrentdecorator. Configure async runner concurrency on the method that does the work instead of incog.yaml:class Runner(cog.BaseRunner): @cog.concurrent(max=4) async def run(self, prompt: str = cog.Input()) -> str: return await generate(prompt)
The value is extracted statically at build time.
concurrency.maxincog.yamlstill works and still takes precedence, but it now warns on build — remove it when you migrate. (#3089) -
Input validation before build and run.
cog predict,cog run, andcog trainnow validate-iinputs against the model's OpenAPI schema before building the image or starting the container, so a typo fails in a second rather than after a full build. Covers unknown input names, missing required inputs, type mismatches, enum values, numeric bounds, string length, and regex patterns. The schema is generated statically fromcog.yaml; for existing images it's read from theopenapi_schemalabel. (#3097) -
acceptonPathandFileinputs. Declare the MIME types or extensions an input takes —Input(accept="image/*"),Input(accept="audio/wav,audio/mp3"),Input(accept=".safetensors,.bin")— and Cog emits it asx-cog-acceptin the OpenAPI schema so UIs and clients know what to offer. Usingaccepton a non-file type is a build error. (#2863) -
Local wheels and source archives in requirements.
build.python_requirementsnow accepts bare local paths like./dist/mylib-0.1.0-py3-none-any.whlor./packages/localpkg.tar.gz. Paths resolve relative to the requirements file, and only the referenced artifacts get staged into the build..whl,.zip,.tar.gz,.tgz,.tar.bz2, and.tar.xzare supported. (#3095)
Improvements
- Readable logs from local commands.
cog serve,cog run,cog predict, andcog trainnow run the model with console-formatted logs instead of production JSON. Deployed models are unaffected. (#2806) - Download progress for
cog weights.cog weights importandcog weights pullshow live Docker-style progress while they populate the local weight store. (#3087) - Prebuilt base images are documented. New base images page covers what's on Cog's prebuilt base images, how
--use-cog-base-imageworks, and how it interacts with--use-cuda-base-image. (#3088)
Bug fixes
- GPU builds on CUDA base images work again. Builds on
nvidia/cudaimages failed withexternally-managed-environmentbecause uv-managed Python is marked PEP 668 externally managed and uv 0.9.x enforces it. Cog now passes--break-system-packageswherever it installs into a uv-managed Python, not just incog base-image. (#3073) - Explicit
cudnnwith a CUDA minor version now validates. A config pairingcuda: "11.6"withcudnn: "8"was rejected up front even though11.6resolves fine to a patch-level base image likenvidia/cuda:11.6.2-cudnn8-devel-ubuntu20.04. Validation now matches versions the same way image selection does. (#3070) - Install one-liners work on Linux arm64.
uname -mreportsaarch64there, but the release asset iscog_Linux_arm64, so the documented curl command andtools/install.shboth 404'd. Both now normalize the architecture. (#3066) - Generated OpenAPI schemas report the real Cog version.
info.versionwas hard-coded to0.1.0; it now carries the version that built the schema. (#3075) cog weights pullis quieter. Directory entries in weight tarballs no longer produceskipping unexpected tar entrylines. (#3076)
- Local servers now bind to
-
v0.21.1-0.20260811222540-e88852c300cd11 Aug 2026 pre-releaseNothing published for this version
-
v0.21.1-0.20260811173841-fc4eb97ea25711 Aug 2026 pre-releaseNothing published for this version
-
v0.21.1-0.20260810162216-e456e1924c6010 Aug 2026 pre-releaseNothing published for this version
-
v0.21.1-0.20260807200530-32daebf40f5207 Aug 2026 pre-releaseNothing published for this version
-
v0.21.1-0.20260805210105-9a62f0c736e105 Aug 2026 pre-releaseNothing published for this version
-
v0.21.1-0.20260805172112-2a67d8ead21a05 Aug 2026 pre-releaseNothing published for this version
-
v0.21.1-0.20260716164215-4e62b8b7037a16 Jul 2026 pre-releaseNothing published for this version
-
v0.21.1-0.20260712122913-b4bcb4357f0912 Jul 2026 pre-releaseNothing published for this version
-
v0.21.1-0.20260707154557-5a4f61a2b52f07 Jul 2026 pre-releaseNothing published for this version
-
v0.21.1-0.20260706190438-966752e9f5f506 Jul 2026 pre-releaseNothing published for this version
-
v0.21.1-0.20260626200724-6cce8fdde9ce26 Jun 2026 pre-releaseNothing published for this version
-
v0.21.1-0.20260625175327-e6dcdfcce05725 Jun 2026 pre-releaseNothing published for this version
-
v0.21.1-0.20260624230137-10b890f4a06a24 Jun 2026 pre-releaseNothing published for this version
-
v0.21.1-0.20260619183335-e5a99769616c19 Jun 2026 pre-releaseNothing published for this version
-
v0.21.016 Jun 2026Release notes
Open source →New features
- Server-Sent Event prediction streams. HTTP prediction requests can now ask for
Accept: text/event-streamto receivestart,output,log,metric, and terminalcompletedevents for predictors that explicitly opt in with@streaming/@cog.streaming. Reconnecting clients can replay retained in-flight prediction events withPUT /predictions/{id}. (#3019) - JSON-native union inputs. Cog now supports union-typed predictor inputs in generated schemas and HTTP request handling, allowing compatible JSON-native values to be resolved correctly. (#3048)
Improvements
- Example models now live in the Cog repository. The example models from
replicate/cog-exampleshave moved into this repository underexamples/, with updatedrun.py/BaseRunnerexamples for common workflows including images, training, notebooks, streaming, concurrency, context, and Replicate API usage. (#3055) - Experimental warning for
cog weights. Everycog weightssubcommand now prints a warning that the weights workflow is experimental and should not be relied on in production workflows yet. (#3025) - Static schema parser target resolution. The static Python schema parser now uses
run()as the primary prediction entry point while preserving legacypredict()fallback behavior, and resolves inherited and imported targets more consistently. (#3027)
Bug fixes
cog.Secretinputs now work with coglet-backed predictions. Predictors that annotate inputs asSecret,Optional[Secret], orSecret | Nonenow receivecog.types.Secretvalues at runtime again, restoring behavior that regressed in the Rust/coglet runtime rewrite. (#3057)cog doctor --fixnow shows available remediation text. Findings without an auto-fix now display their remediation message instead of incorrectly saying no auto-fix is available. (#3031)- Cog-managed weight uploads now send the correct layer media type. Weight layer uploads now propagate the Cog weight media type during registry finalization while preserving regular image-layer behavior. (#3033)
- Predictor validation now handles PEP 563 string annotations. Predictor files using
from __future__ import annotationsno longer reject validsetup() -> Nonemethods or accept invalidrun() -> Nonemethods becauseNoneannotations were stored as strings. (#3034) cog servenow mounts weights likecog run. Models served locally now receive configured weights consistently with local prediction runs. (#3044)- Omitted optional inputs now resolve to
Noneat the HTTP edge. Optional predictor inputs omitted from HTTP requests are now passed asNoneinstead of being treated inconsistently by request handling. (#3051)
- Server-Sent Event prediction streams. HTTP prediction requests can now ask for
-
v0.21.0-rc.305 Jun 2026 pre-release -
v0.21.0-rc.202 Jun 2026 pre-release -
v0.21.0-rc.129 May 2026 pre-releaseRelease notes
Open source →New features
- Server-Sent Event prediction streams. HTTP prediction requests can now ask for
Accept: text/event-streamto receivestart,output,log,metric, and terminalcompletedevents for predictors that explicitly opt in with@streaming/@cog.streaming. Reconnecting clients can replay retained in-flight prediction events withPUT /predictions/{id}. (#3019)
Improvements
- Experimental warning for
cog weights. Everycog weightssubcommand now prints a warning that the weights workflow is experimental and should not be relied on in production workflows yet. (#3025) - Static schema parser target resolution. The static Python schema parser now uses
run()as the primary prediction entry point while preserving legacypredict()fallback behavior, and resolves inherited and imported targets more consistently. (#3027)
Bug fixes
cog doctor --fixnow shows available remediation text. Findings without an auto-fix now display their remediation message instead of incorrectly saying no auto-fix is available. (#3031)- Cog-managed weight uploads now send the correct layer media type. Weight layer uploads now propagate the Cog weight media type during registry finalization while preserving regular image-layer behavior. (#3033)
- Predictor validation now handles PEP 563 string annotations. Predictor files using
from __future__ import annotationsno longer reject validsetup() -> Nonemethods or accept invalidrun() -> Nonemethods becauseNoneannotations were stored as strings. (#3034)
- Server-Sent Event prediction streams. HTTP prediction requests can now ask for
-
v0.20.1-0.20260527170413-51825094bbc727 May 2026 pre-releaseNothing published for this version
-
v0.20.1-0.20260526163624-dce03803cee426 May 2026 pre-releaseNothing published for this version
-
v0.20.1-0.20260522194237-1f6c4cdbd8b922 May 2026 pre-releaseNothing published for this version
-
v0.20.1-0.20260520164607-e071abab028a20 May 2026 pre-releaseNothing published for this version
-
v0.20.019 May 2026Release notes
Open source →New features
cog runcommand. Thecog predictcommand has been renamed tocog runwith full backward compatibility.cog predictstill works as an alias. (#3015)- Model refs for
cog pushand weights commands. You can now reference models by name (e.g.,r8.im/user/model) instead of full image URLs when pushing or managing weights. (#3018) - Multi-source weights and HTTPS weight sources. Weights can now be fetched from multiple sources, including direct HTTPS URLs. (#3008)
- Opaque annotations in schema generation. Predictor inputs can use the new
Opaqueannotation to exclude fields from the generated schema. (#3001)
Improvements
- Runtime schema generation fully removed. The legacy runtime Python schema generation path has been completely removed. Cog exclusively uses static schema generation, making builds faster and more reliable. (#3003)
- Centralized build state and cleaner Docker context. Cog now stores build state in a dedicated
.cog/directory that is automatically filtered from the Docker build context. (#3000) - Support durable base-image build context. Base image builds now support a durable build context for better caching and reliability. (#3004)
- Support uv-managed Python installs in generated Dockerfiles. Generated Dockerfiles now properly handle Python installations managed by
uv. (#2999)
Bug fixes
- Pushing a model with a version tag now emits a clean URL. The Replicate model URL printed after
cog pushno longer includes the image tag (e.g.,:latest), preventing 404 errors when users click the link. (#3020) - Prefer latest torch patch when resolving unpatched versions. When resolving PyTorch compatibility, Cog now correctly selects the latest available patch version for unpatched version specs. (#3009)
- Deterministic compatibility matrix output. Compatibility matrices are now sorted for consistent, deterministic output. (#3006)
-
v0.19.4-0.20260515193546-3f26e5dffbce15 May 2026 pre-releaseNothing published for this version
-
v0.19.4-0.20260514193246-6842f0ca5bf114 May 2026 pre-releaseNothing published for this version
-
v0.19.4-0.20260508175352-14d224eba24c08 May 2026 pre-releaseNothing published for this version
-
v0.19.4-0.20260506202150-3ec21f66678c06 May 2026 pre-releaseNothing published for this version
-
v0.19.4-0.20260505223522-ce95b7404dfa05 May 2026 pre-releaseNothing published for this version
-
v0.19.4-0.20260505015450-f089bc408eea05 May 2026 pre-releaseNothing published for this version
-
v0.19.304 May 2026Release notes
Open source → -
v0.19.3-0.20260501222258-cac3e91a928c01 May 2026 pre-releaseNothing published for this version
-
v0.19.201 May 2026 -
v0.19.130 Apr 2026Release notes
Open source →Bug fixes
- Support for TypedDict in schema generation. Fixed an issue where TypedDict type annotations would cause schema generation to fail. (#2978)
- Build order fix for resource exhaustion. Reordered coglet wheel build to run after cog/sdk builds to prevent resource exhaustion during release builds. (#2977)
Maintenance
- Removed dead Go code. Cleaned up unused code identified by deadcode analysis. (#2979)
- Removed accidentally committed folder. Deleted a folder that shouldn't have been in the repository. (#2972)
- CI lockfile improvements. Switched to strict lockfile mode and regenerated mise.lock. (#2975)
Dependencies
-
v0.19.1-0.20260429211705-2a0755ca5b0829 Apr 2026 pre-releaseNothing published for this version
-
v0.19.1-0.20260425122704-aea7995e8e6a25 Apr 2026 pre-releaseNothing published for this version
-
v0.19.024 Apr 2026Release notes
Open source →New features
cog doctorcommand. Diagnose common Cog setup issues, check configuration, and verify that everything is working correctly. Runcog doctorto validate your environment. (#2923)
Improvements
- Static schema generation is now the default. Cog now generates prediction schemas statically from your predictor's type annotations rather than importing and inspecting the Python code at build time. This makes builds faster and more reliable. Use
COG_LEGACY_SCHEMA=1to opt out if you encounter issues. (#2950) - Test harness improvements. The Cog integration test harness now runs tests in parallel and provides better error reporting. (#2944)
Bug fixes
- Separate-weights builds with r8.im image names work correctly. Schema validation no longer fails when building with separate weights and using
r8.im/...image names. (#2954) - Static schema generation handles more edge cases. Fixed issues with certain type annotation patterns in static schema generation. (#2948)
Secret = Input(default=None)is treated as optional. Secret inputs withNonedefaults are now correctly identified as optional in the generated schema. (#2949)
-
v0.18.1-0.20260420184606-8e5c5ee99dc620 Apr 2026 pre-releaseNothing published for this version
-
v0.18.1-0.20260417131846-d343eb6aa79c17 Apr 2026 pre-releaseNothing published for this version
-
v0.18.015 Apr 2026Nothing published for this version
-
v0.17.3-0.20260410191745-61a04a227ded10 Apr 2026 pre-releaseNothing published for this version
-
v0.17.3-0.20260409205704-fea9db803fe109 Apr 2026 pre-releaseNothing published for this version
-
v0.17.3-0.20260407212303-6019c1b77a3307 Apr 2026 pre-releaseNothing published for this version
-
v0.17.201 Apr 2026Nothing published for this version
-
v0.17.2-0.20260328010655-6ccf980ce8a728 Mar 2026 pre-releaseNothing published for this version
-
v0.17.127 Mar 2026Nothing published for this version
-
v0.17.025 Mar 2026Nothing published for this version
-
v0.17.0-rc.424 Mar 2026 pre-releaseNothing published for this version
-
v0.17.0-rc.323 Mar 2026 pre-releaseNothing published for this version
-
v0.17.0-rc.2.0.20260320222113-cb3ac3c727f620 Mar 2026 pre-releaseNothing published for this version
-
v0.17.0-rc.2.0.20260318195950-6361ba9832b318 Mar 2026 pre-releaseNothing published for this version
-
v0.17.0-rc.2.0.20260313184453-f42aa3b55a5713 Mar 2026 pre-releaseNothing published for this version
-
v0.17.0-rc.212 Mar 2026 pre-releaseNothing published for this version
-
v0.17.0-rc.1.0.20260312185645-028b6fecfbcb12 Mar 2026 pre-releaseNothing published for this version
-
v0.17.0-rc.1.0.20260312135913-fd95417d74c712 Mar 2026 pre-releaseNothing published for this version
-
v0.17.0-rc.1.0.20260309161701-3f62e3d9936809 Mar 2026 pre-releaseNothing published for this version
-
v0.17.0-rc.1.0.20260306172125-63cf1d87199206 Mar 2026 pre-releaseNothing published for this version
-
v0.17.0-rc.1.0.20260302223427-9616e8db800b02 Mar 2026 pre-releaseNothing published for this version
-
v0.17.0-rc.1.0.20260228183350-e3d30f26e25028 Feb 2026 pre-releaseNothing published for this version