feat: add custom binary config for gemini, opencode, codex tools#555
Closed
liqimore wants to merge 4 commits intoasheshgoplani:mainfrom
Closed
feat: add custom binary config for gemini, opencode, codex tools#555liqimore wants to merge 4 commits intoasheshgoplani:mainfrom
liqimore wants to merge 4 commits intoasheshgoplani:mainfrom
Conversation
Signed-off-by: Ricky Li <hi@liqi.link>
Contributor
|
Please see #550 as it's closely-related. |
Signed-off-by: Ricky Li <hi@liqi.link>
Signed-off-by: Ricky Li <hi@liqi.link>
Author
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.
Background
Previously, only Claude supported custom binary configuration via
[claude].commandinconfig.toml. Gemini, OpenCode, and Codex all had their binary names hardcoded in the respectivebuildXxxCommand()functions. This meant users who needed to launch these tools through a wrapper or proxy binary (e.g.codex-proxy) had no supported way to configure this — and sessionresume/restart logic would break when a custom command name was in use.
Changes
Add a
command = "..."config field to[gemini],[opencode], and[codex]sections inconfig.toml, following the exact same pattern as Claude.internal/session/userconfig.goCommand string \toml:"command"`toGeminiSettings,OpenCodeSettings,CodexSettings`internal/session/gemini.goGetGeminiCommand()— returns configured binary or defaults to"gemini"internal/session/instance.goGetOpenCodeCommand()— returns configured binary or defaults to"opencode"GetCodexCommand()— returns configured binary or defaults to"codex"buildGeminiCommand,buildOpenCodeCommand,buildCodexCommandto use the getter;isStandardStartnow matches either the canonical name or the configured binary, so sessionresume logic is triggered correctly in both cases
Usage
note:
claude-proxy means the binary was start using proxychains4, eg: