CLI's (Codex, Gemini, Claude) have been added as provider.#13
CLI's (Codex, Gemini, Claude) have been added as provider.#13tr-varlg wants to merge 2 commits intoownpilot:mainfrom
Conversation
…th user interface integration.
ersinkoc
left a comment
There was a problem hiding this comment.
Review: CLI Providers
The architectural idea of centralizing provider creation into model-execution.ts is solid, but there are several blocking issues.
Critical — Must Fix
-
Turkish UI strings — Project rule: everything must be in English. Multiple user-facing strings in
ProvidersTab.tsxare in Turkish (toast messages, banners, removal modal). All must be translated. -
Reduced
NATIVE_PROVIDERSset —createSingleRuntimeProvider()only checks foropenai, anthropic, google. The existing code supports 10 native providers (deepseek, groq, mistral, xai, together, fireworks, perplexityetc.). This silently regresses all of those to theopenaiprovider type, losing provider-specific SDK features. -
Fallback model parameter dropped —
createRuntimeProvider()ignores the fallback model entirely. The original code inagent-service.tsusedfallback.modeland had anonFallbackobservability callback. Both are lost.
High
-
stream()is not actually streaming —collectStreamingProcess()buffers the entire output, then yields all chunks at once. Streaming consumers will appear to hang until CLI completes. -
Provider ID collision —
gemini-clialready exists as aBuiltinCodingAgentProviderincoding-agent-service.ts. Adding it as a chat runtime provider with the same ID creates ambiguity. -
process.cwd()as working directory — CLI completions run in the server's working directory, potentially exposing server-side files. The coding agent service hasvalidateCwd()for this purpose.
Medium
-
No tests for
model-execution.ts— 564 lines of new core logic with zero unit tests. The module is fully mocked in other test files, so none of its behavior is actually verified. -
apiKey ?? ''— Passing empty string API keys will cause 401s at the API level rather than failing fast. Consider making the field optional or handling the no-key case explicitly.
Suggestion
Consider splitting this into two PRs:
- Refactor: Centralize provider creation logic (pure refactor, no new features)
- Feature: Add CLI runtime providers on top of the clean foundation
This would make it much easier to verify the refactor doesn't regress existing behavior.
Thanks for the contribution! The centralization direction is right — just needs these issues addressed.
Selam abi, twitter'dan yazmıştım CLI kullanımıyla alakalı.
Ben Codex'ten destek alarak içeri entegre etmeye çalıştım. Şimdilik bende iş görür durumda ama geri kalan API Key kısımlarını da test edemedim. Umarım fayda sağlar :)