Skip to content

feat: add prime rl configs command#490

Merged
d42me merged 4 commits intomainfrom
feat/rl-configs-command
Apr 15, 2026
Merged

feat: add prime rl configs command#490
d42me merged 4 commits intomainfrom
feat/rl-configs-command

Conversation

@cdreetz
Copy link
Copy Markdown
Contributor

@cdreetz cdreetz commented Apr 2, 2026

Did not use prime-rl type descriptions because would lead to missing descriptions for hosted configs that are not options in prime-rl. Should either have a server endpoint that returns all the expected types or rewrite all descriptions here. Not great that there is no single source of truth. But not priority for this PR, just showing the options is good.

Summary

  • Adds prime rl configs command that lists all available hosted RL config options
  • Table groups options by TOML section with horizontal separators
  • Derives everything from existing Pydantic models — no manual maintenance
  • Supports --output json
image

Test plan

  • prime rl configs renders grouped table
  • prime rl configs --output json returns structured JSON
  • prime rl configs --help shows help text

🤖 Generated with Claude Code


Note

Low Risk
Low risk: adds a read-only CLI command that introspects the existing RLConfig Pydantic schema to display config options; main risk is incorrect schema flattening/type rendering for some edge cases.

Overview
Adds a new prime rl configs CLI command to enumerate available RL TOML configuration keys, grouped by section in table output and optionally emitted as structured JSON (--output json).

Implements JSON-schema traversal utilities (_flatten_config_schema, _schema_type_str, ref/optional unwrapping) to derive dotted config paths, human-readable types, and defaults from RLConfig without manual maintenance, and adds tests covering optional nested models and optional array item type rendering.

Reviewed by Cursor Bugbot for commit 669f8b3. Bugbot is set up for automated code reviews on this repo. Configure here.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2fb981e5e4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/prime/src/prime_cli/commands/rl.py
Comment thread packages/prime/src/prime_cli/commands/rl.py
Lists all available hosted RL config options in a table with section
grouping, derived from existing Pydantic models. Supports --output json.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@cdreetz cdreetz force-pushed the feat/rl-configs-command branch from 2fb981e to b339d9d Compare April 2, 2026 21:16
Comment thread packages/prime/src/prime_cli/commands/rl.py Outdated
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Autofix Details

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: Duplicate env_file and env_files field definitions in RLConfig
    • Removed duplicate field definitions at lines 492-493, keeping only the original definitions after run_config.

Create PR

Or push these changes by commenting:

@cursor push be5d8d38d6
Preview (be5d8d38d6)
diff --git a/packages/prime/src/prime_cli/commands/rl.py b/packages/prime/src/prime_cli/commands/rl.py
--- a/packages/prime/src/prime_cli/commands/rl.py
+++ b/packages/prime/src/prime_cli/commands/rl.py
@@ -489,8 +489,6 @@
     max_async_level: int | None = None
     checkpoint_id: str | None = None  # Warm-start from an existing checkpoint
     cluster_name: str | None = None  # Admin-only: target a specific cluster by name
-    env_file: List[str] = Field(default_factory=list)  # deprecated, use env_files
-    env_files: List[str] = Field(default_factory=list)
     env: List[EnvConfig] = Field(default_factory=list)
     sampling: SamplingConfig = Field(default_factory=SamplingConfig)
     eval: EvalConfig = Field(default_factory=EvalConfig)

This Bugbot Autofix run was free. To enable autofix for future PRs, go to the Cursor dashboard.

Comment thread packages/prime/src/prime_cli/commands/rl.py Outdated
Co-authored-by: Christian R <cdreetz@users.noreply.github.com>
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 26a5477. Configure here.

Comment thread packages/prime/src/prime_cli/commands/rl.py
@d42me d42me merged commit 430e77d into main Apr 15, 2026
12 checks passed
@d42me d42me deleted the feat/rl-configs-command branch April 15, 2026 02:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants