fix: resolve CI linting errors for Qwen OAuth

- Fix gci formatting: remove trailing whitespace on line 230
- Add nolint:gosmopolitan for intentional Chinese UI strings
- Remove unused qwenPortalBaseURL constant
- Fix spelling: serialises → serializes

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
kyeo 2026-02-27 08:38:10 +08:00
parent ef9a14a3c9
commit 4c965030b7
3 changed files with 4 additions and 5 deletions

View file

@ -499,6 +499,7 @@ func authLoginQwen() error {
fmt.Println("\n✓ Qwen OAuth login successful!")
fmt.Println("Default model set to: qwen-coder (coder-model)")
fmt.Println("Available models: qwen-coder, qwen-vision")
//nolint:gosmopolitan // intentional Chinese character for user-facing message
fmt.Println("Try it: picoclaw agent -m \"你好\" --model qwen-coder")
return nil

View file

@ -25,9 +25,6 @@ const (
qwenClientID = "f0304373b74a44d2b584a3fb70ca9e56"
qwenOAuthScope = "openid profile email model.completion"
qwenDeviceGrantType = "urn:ietf:params:oauth:grant-type:device_code"
// Qwen Portal API base URL (OpenAI-compatible endpoint)
// This is the same endpoint used by OpenClaw
qwenPortalBaseURL = "https://portal.qwen.ai/v1"
)
// qwenDeviceAuthorization is returned by the device/code endpoint.
@ -176,6 +173,7 @@ func pollQwenToken(deviceCode, verifier string, interval, expiresIn int) (*qwenT
// until the token is granted.
func LoginQwenQRCode() (*AuthCredential, error) {
fmt.Println()
//nolint:gosmopolitan // intentional Chinese characters for user-facing message
fmt.Println("=== Qwen (通义千问) OAuth Login ===")
fmt.Println()

View file

@ -134,7 +134,7 @@ func (p *QwenOAuthProvider) Chat(
return p.parseResponse(body)
}
// buildRequestBody serialises the chat request as an OpenAI-compatible JSON body.
// buildRequestBody serializes the chat request as an OpenAI-compatible JSON body.
func (p *QwenOAuthProvider) buildRequestBody(
messages []Message,
tools []ToolDefinition,