diff --git a/cmd/picoclaw/internal/auth/helpers.go b/cmd/picoclaw/internal/auth/helpers.go index 157b9e2d4..eb13b5eea 100644 --- a/cmd/picoclaw/internal/auth/helpers.go +++ b/cmd/picoclaw/internal/auth/helpers.go @@ -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 diff --git a/pkg/auth/qwen_oauth.go b/pkg/auth/qwen_oauth.go index b23740eb3..f8e763d06 100644 --- a/pkg/auth/qwen_oauth.go +++ b/pkg/auth/qwen_oauth.go @@ -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() @@ -227,7 +225,7 @@ func LoginQwenQRCode() (*AuthCredential, error) { // 5. Build credential expiresAt := time.Now().Add(time.Duration(tok.ExpiresIn) * time.Second) - + cred := &AuthCredential{ AccessToken: tok.AccessToken, RefreshToken: tok.RefreshToken, diff --git a/pkg/providers/qwen_provider.go b/pkg/providers/qwen_provider.go index 87207b3b6..0bd5637ea 100644 --- a/pkg/providers/qwen_provider.go +++ b/pkg/providers/qwen_provider.go @@ -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,