feat: restructure runtime config and remove cerebrium. prefix#57
Open
elijah-rou wants to merge 5 commits intomainfrom
Open
feat: restructure runtime config and remove cerebrium. prefix#57elijah-rou wants to merge 5 commits intomainfrom
elijah-rou wants to merge 5 commits intomainfrom
Conversation
…imes Split [cerebrium.runtime.custom] into separate runtime types: - [cerebrium.runtime.cortex] for Cerebrium managed Python (default) - [cerebrium.runtime.python] for custom Python ASGI apps - [cerebrium.runtime.docker] for custom Dockerfiles Move runtime-specific params (python_version, docker_base_image_url, shell_commands, pre_build_commands, use_uv) from [cerebrium.deployment] to the appropriate runtime sections. Backwards compatibility maintained: - Deprecated [cerebrium.runtime.custom] still works with warnings - Deprecated deployment fields still work with warnings - Runtime section values take precedence over deprecated fields
wesrobin
reviewed
Jan 23, 2026
Replace specific runtime structs (CortexRuntimeConfig, PythonRuntimeConfig, DockerRuntimeConfig, etc.) with a single generic RuntimeConfig that accepts any [cerebrium.runtime.<name>] section. The CLI now passes runtime parameters through to the backend for validation, allowing new runtimes to be added without CLI changes. Key changes: - RuntimeConfig now has Type (string) and Params (map[string]any) - CLI only validates local requirements (file paths exist) - Backend validates runtime-specific parameters - Backwards compatible with deprecated deployment fields
wesrobin
reviewed
Jan 23, 2026
elijah-rou
commented
Jan 23, 2026
Move dependencies from top-level [cerebrium.dependencies] to runtime-specific
sections [cerebrium.runtime.{type}.dependencies.*] while maintaining backwards
compatibility with deprecation warnings.
- Add GetDependencies() to RuntimeConfig to parse deps from runtime params
- Add GetEffectiveDependencies() to merge top-level and runtime deps (runtime wins)
- Add deprecation warning when top-level dependencies are used
- Update dependency file generation to use merged dependencies
- Add ValidateRuntime API endpoint to validate runtime config before deploy
- Include effective dependencies in runtime validation payload
- Add helper methods for shell_commands and pre_build_commands from runtime
Support both formats for TOML configuration: - New format: [deployment], [runtime.cortex], [hardware], etc. - Legacy format: [cerebrium.deployment], [cerebrium.runtime.cortex], etc. The legacy format with cerebrium. prefix is now deprecated and shows a warning, but remains fully functional for backwards compatibility. Mixing formats in the same file is not allowed.
- Add _file_relative_path key inside dependency maps (pip, conda, apt) as the new recommended way to specify requirements files - Maintain backwards compatibility with deprecated [dependencies.paths] section - both patterns work, new key takes precedence - Parse requirements.txt format and merge inline packages on top (inline wins per-package) - Add deprecation warnings for [dependencies.paths] usage pointing users to the new _file_relative_path pattern - Add comprehensive tests for both old and new patterns
151ca8e to
64c787d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
cerebrium.prefix requirement (backwards compatible with deprecation warnings)_file_relative_pathkey for dependency files with file+inline mergingChanges
Runtime Config
map[string]anypassed to backend for validationConfig Format
cerebrium.prefix is recommended[cerebrium.*]format still works with deprecation warningDependencies
_file_relative_pathkey inside dependency maps (recommended)[dependencies.paths]section still works with warningcerebrium.prefixDeprecation Warnings
Users see warnings for:
[cerebrium.*]prefix usage[cerebrium.dependencies]/[dependencies]top-level section (should move to runtime)[cerebrium.dependencies.paths]/[dependencies.paths]section[runtime.custom]usage (migrate to[runtime.docker]or[runtime.python])Test Plan
_file_relative_pathpatterncerebrium.prefix and non-prefix formatsmake buildsucceeds