cli: answer --version and --help instead of starting the server - #74
Merged
Conversation
`gw <anything>` used to ignore its arguments and boot with the embedded config; a version probe became a stray server. The binary now prints its version for --version/-V, the usage line for --help/-h, and refuses any other argument. docs: the Moonshot international endpoint for kimi-k3.
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.
gw <anything>used to ignore its arguments and boot with the embedded config, so a version probe became a stray server. The binary now answers--version/-Vwithgw <version>,--help/-hwith the usage line, and refuses any other argument (exit 1, usage on stderr). Nothing in the repo passes arguments togw(DockerENTRYPOINT ["/usr/local/bin/gw"], the deploy files and the bench scripts all run it bare), so running behavior is unchanged.Also in this PR: the README quick start shows the flag, and
docs/providers.mdnotes Moonshot's international endpoint (endpoint: https://api.moonshot.ai; keys are site-specific and kimi-k3 is only served there).Gates on macOS:
cargo fmt --all -- --checkclean,cargo clippy --workspace --all-targets -- -D warningsclean,cargo test --workspace597 passed / 0 failed (two new tests incrates/server/tests/cli.rsdrive the built binary throughCARGO_BIN_EXE_gw). CI covers Linux.