Skip to content

Fix OpenAI workspace create defaults - #182

Merged
yoanbernabeu merged 1 commit into
yoanbernabeu:mainfrom
garitar:codex/workspace-openai-parity
Mar 16, 2026
Merged

yoanbernabeu merged 1 commit into
yoanbernabeu:mainfrom
garitar:codex/workspace-openai-parity

Conversation

@garitar

@garitar garitar commented Mar 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • fix OpenAI workspace create so generated workspaces write parallelism: 4 instead of 0
  • reuse shared config defaults for OpenAI/Ollama/LM Studio endpoints and default models in workspace creation paths
  • keep the OpenAI workspace default model as text-embedding-3-small

Details

This PR is intentionally separate from #181.

grepai workspace create had its own defaulting logic and did not set embedder.parallelism for OpenAI, so generated ~/.grepai/workspace.yaml entries contained parallelism: 0. The OpenAI default model remains the current upstream product default (text-embedding-3-small); this change only fixes parity and explicitness for workspace config generation.

The patch:

  • sets parallelism to 4 for OpenAI workspace creation in both the shared flag path and interactive path
  • reuses shared config constants where available instead of repeating string literals
  • adds focused tests for OpenAI workspace creation defaults

Validation

  • go test ./cli -run 'TestCreateWorkspaceNonInteractive|TestIntegration_WorkspaceCreateAndMCPResolve'
  • go build -o /Users/gary/AI/vendor/grepai/bin/grepai ./cmd/grepai
  • isolated runtime check: grepai workspace create demo --backend postgres --provider openai --yes now writes parallelism: 4 while keeping model: text-embedding-3-small

@codecov

codecov Bot commented Mar 9, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 46.09%. Comparing base (a322537) to head (75c1ba4).
⚠️ Report is 97 commits behind head on main.

Files with missing lines Patch % Lines
cli/workspace.go 50.00% 6 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main     #182       +/-   ##
===========================================
+ Coverage   27.16%   46.09%   +18.93%     
===========================================
  Files          32       70       +38     
  Lines        3711    13664     +9953     
===========================================
+ Hits         1008     6299     +5291     
- Misses       2620     6715     +4095     
- Partials       83      650      +567     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@yoanbernabeu

Copy link
Copy Markdown
Owner

Thanks for the contribution @garitar! Clean fix with good test coverage. 🚀

@yoanbernabeu
yoanbernabeu merged commit a0c5e3e into yoanbernabeu:main Mar 16, 2026
10 checks passed
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.

2 participants