Skip to content

feat(coding-agent): add experimental feature guard#5547

Merged
vegarsti merged 1 commit into
mainfrom
pi-experimental
Jun 9, 2026
Merged

feat(coding-agent): add experimental feature guard#5547
vegarsti merged 1 commit into
mainfrom
pi-experimental

Conversation

@vegarsti

@vegarsti vegarsti commented Jun 9, 2026

Copy link
Copy Markdown
Member

As described in RFC 0043, this PR adds an experimental feature guard which can be trigged by running Pi with PI_EXPERIMENTAL=1.

@vegarsti vegarsti requested review from badlogic and mitsuhiko June 9, 2026 10:50
Comment thread packages/coding-agent/docs/settings.md Outdated
@badlogic

badlogic commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

This requires us to pass through the SettingsManager everywhere we need access to the flag. This gets ugly fast. As per the RFC, we only evaluate the env var, we do not store in settings.json.

I propose a simpler solution: experimental.ts, with a single function areExperimentalFeaturesEnabled(). All it does (for now) is evaluate the process.env.PI_EXPERIMENTAL env var for truthiness and return the result. All other code can just import this function without needing to have access to SettingsManager.

@vegarsti

vegarsti commented Jun 9, 2026

Copy link
Copy Markdown
Member Author

Very good, that makes a lot of sense. Thanks!

@vegarsti vegarsti changed the title feat(coding-agent): add experimental feature flag feat(coding-agent): add experimental feature guard Jun 9, 2026
Comment thread packages/coding-agent/test/experimental.test.ts Outdated
@vegarsti vegarsti merged commit 66335d3 into main Jun 9, 2026
1 check passed
@vegarsti vegarsti deleted the pi-experimental branch June 9, 2026 11:23
Whoaa512 added a commit to Whoaa512/pi-mono that referenced this pull request Jun 10, 2026
…base-2026-06-09

* upstream/main: (115 commits)
  Closes earendil-works#5045, /new should not persist if original session was ephemeral
  feat(tui): support autocomplete trigger characters
  docs(coding-agent): clarify model name display docs
  feat(coding-agent): add prompt template argument defaults
  fix: --help and --version redirect
  fix(ai): map OpenCode max tokens
  fix(coding-agent): stabilize OAuth login prompt rows
  fix(ai): use z.ai thinking payload
  fix: simplify help
  feat(ui): Improved project approval settings
  feat(coding-agent): add experimental feature guard (earendil-works#5547)
  fix(coding-agent): sync queue modes on reload
  fix(coding-agent): handle invalid models json during migration
  fix(tui): restore prompt draft after history browsing
  feat(coding-agent): expose project trust to extensions
  chore: approve contributor dangooddd
  fix(ai): disable Azure OpenAI response storage
  fix(tui): wrap CJK text at grapheme boundaries
  chore: approve contributor vdxz
  fix(ai): disable Moonshot thinking when requested
  ...

# Conflicts:
#	packages/ai/src/models.generated.ts
#	packages/ai/src/providers/openai-completions.ts
#	packages/coding-agent/src/core/extensions/loader.ts
#	packages/coding-agent/src/core/resource-loader.ts
#	packages/coding-agent/src/modes/interactive/interactive-mode.ts
alnaggar-dev added a commit to alnaggar-dev/pi that referenced this pull request Jun 10, 2026
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