Skip to content

[Bugfix] fix smg command argument cannot be used multiple times#366

Open
lengrongfu wants to merge 2 commits into
lightseekorg:mainfrom
lengrongfu:fix/gateway-args
Open

[Bugfix] fix smg command argument cannot be used multiple times#366
lengrongfu wants to merge 2 commits into
lightseekorg:mainfrom
lengrongfu:fix/gateway-args

Conversation

@lengrongfu

@lengrongfu lengrongfu commented Jun 6, 2026

Copy link
Copy Markdown

Summary

Fix: #365

Because generate smg command argument --disable-retries --disable-circuit-breaker this part is multiple times.

/home/jovyan/code/tokenspeed/.venv/bin/python3 -m smg launch --worker-urls grpc://127.0.0.1:37693 --disable-retries --disable-circuit-breaker --model /new-model/gpt-oss-20b/ --log-level debug --port 8000 --reasoning-parser passthrough --disable-circuit-breaker --disable-retries --tokenizer-cache-enable-l0 --tokenizer-cache-enable-l1 --prometheus-port 8413

In _gateway_args_with_smg_disable_defaults this method will add this two default argument.

_DEFAULT_SMG_DISABLE_FLAGS = (
    "--disable-circuit-breaker",
    "--disable-retries",
)
def _gateway_args_with_smg_disable_defaults(gateway_args: list[str]) -> list[str]:
    """Append the smg reliability-disable switches if they are not already there."""
    result = list(gateway_args)
    for flag in _DEFAULT_SMG_DISABLE_FLAGS:
        if flag not in result:
            result.append(flag)
    return result

Test Plan

$ tokenspeed serve /new-model/gpt-oss-20b/ --log-level debug

Signed-off-by: rongfu.leng <lenronfu@gmail.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3782ed80ff

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread python/tokenspeed/cli/_proc.py
…ateway unit test

Signed-off-by: rongfu.leng <lenronfu@gmail.com>
@lengrongfu

Copy link
Copy Markdown
Author

@lightseek-bot please take a look.

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.

[Bug] tokenspeed serve startup failed

1 participant