跳转到内容

配置参考

飞码扣所有配置选项的完整参考。

所有飞码扣设置在 VS Code 设置中以 feima. 为前缀。


OAuth2 认证服务器基础 URL。

类型: string 默认值: "https://auth.feimacode.cn" 作用域: machine-overridable

说明:

  • 用于 OAuth2 认证流程
  • 默认值适用于中国区
  • 仅在调试或使用自定义认证服务器时修改

有效值:

  • "https://auth.feimacode.cn" - 中国区生产环境
  • "http://localhost:8000" - 本地开发环境

示例:

{
"feima.auth.baseUrl": "https://auth.feimacode.cn"
}

OAuth2 客户端 ID。

类型: string 默认值: "vscode-feima-client" 作用域: machine-overridable

说明:

  • OAuth2 客户端标识符
  • 用于认证请求
  • 默认值适用于标准飞码扣客户端

示例:

{
"feima.auth.clientId": "vscode-feima-client"
}

OAuth2 发行者 URL。

类型: string 默认值: "https://auth.feimacode.cn" 作用域: machine-overridable

说明:

  • JWT token 发行者验证
  • 必须与认证服务器 URL 一致
  • 用于 token 验证

示例:

{
"feima.auth.issuer": "https://auth.feimacode.cn"
}

模型推理 API 服务器基础 URL。

类型: string 默认值: "https://api.feimacode.cn/v1" 作用域: machine-overridable

说明:

  • 用于所有 AI 模型请求
  • 默认值适用于中国区
  • 仅在调试或使用自定义 API 服务器时修改

有效值:

  • "https://api.feimacode.cn/v1" - 中国区生产环境
  • "http://localhost:8001/v1" - 本地开发环境

示例:

{
"feima.api.baseUrl": "https://api.feimacode.cn/v1"
}

在状态栏显示剩余请求配额。

类型: boolean 默认值: true 作用域: window

说明:

  • 启用时,状态栏显示剩余请求次数
  • 禁用时,状态栏仅显示登录状态
  • 建议保持启用以监控额度使用

示例:

{
"feima.showQuotaInStatusBar": true
}

额度不足警告阈值。

类型: number 默认值: 50 作用域: window

说明:

  • 当剩余请求次数低于此阈值时,显示警告通知
  • 默认值为 50 次
  • 可根据使用频率调整

有效范围: 0 - 10000

示例:

{
"feima.warnWhenQuotaLow": 100
}

额度促销页面 URL。

类型: string 默认值: "https://feimacode.cn/promotion" 作用域: machine-overridable

说明:

  • 当额度不足时,用户可访问此页面获取更多额度
  • 默认值适用于中国区
  • 仅在调试或使用自定义促销页面时修改

示例:

{
"feima.promotionUrl": "https://feimacode.cn/promotion"
}

作用域说明存储位置
machine-overridable可在机器级别覆盖用户设置或工作区设置
window窗口级别工作区设置
application应用级别用户设置

当同一设置在不同位置定义时,优先级如下:

  1. 工作区设置 (.vscode/settings.json) - 最高优先级
  2. 用户设置 (全局 settings.json)
  3. 默认值 - 最低优先级

{
"feima.auth.baseUrl": "https://auth.feimacode.cn",
"feima.api.baseUrl": "https://api.feimacode.cn/v1",
"feima.auth.clientId": "vscode-feima-client",
"feima.auth.issuer": "https://auth.feimacode.cn",
"feima.promotionUrl": "https://feimacode.cn/promotion",
"feima.showQuotaInStatusBar": true,
"feima.warnWhenQuotaLow": 50
}
{
"feima.auth.baseUrl": "http://localhost:8000",
"feima.api.baseUrl": "http://localhost:8001/v1",
"feima.auth.clientId": "dev-client",
"feima.auth.issuer": "http://localhost:8000",
"feima.showQuotaInStatusBar": true
}

Windows: %APPDATA%\Code\User\settings.json

macOS: ~/Library/Application Support/Code/User/settings.json

Linux: ~/.config/Code/User/settings.json

项目根目录: .vscode/settings.json


命令说明
飞码: 登录登录飞码账号
飞码: 注销注销当前会话
飞码: 查看账号显示账号信息和剩余额度

Type: number Default: 30000 Scope: Window Minimum: 1000 Maximum: 300000

Description: Maximum time to wait for an API response. Increase if experiencing timeouts on slow connections.

Example:

{
"feima.requestTimeout": 60000
}

Maximum number of retry attempts.

Type: number Default: 3 Scope: Window Minimum: 0 Maximum: 10

Description: Number of times to retry failed requests before giving up.

Example:

{
"feima.maxRetries": 5
}

Delay between retries in milliseconds.

Type: number Default: 1000 Scope: Window Minimum: 100 Maximum: 10000

Description: How long to wait between retry attempts.

Example:

{
"feima.retryDelay": 2000
}

Enable streaming responses.

Type: boolean Default: true Scope: Window

Description: When enabled, streams responses as they’re generated. Provides better UX but may use more resources.

Example:

{
"feima.enableStreaming": false
}

Custom aliases for models.

Type: object Default: {} Scope: Window

Description: Define custom aliases for frequently used models.

Example:

{
"feima.modelAliases": {
"code": "deepseek-coder-v2",
"review": "claude-3.5-sonnet",
"chinese": "tongyi-qianwen-3-coder",
"arch": "gpt-4o"
}
}

Model override for current workspace.

Type: string | null Default: null Scope: Workspace

Description: Override the default model for this specific workspace. Takes precedence over feima.defaultModel.

Example:

{
"feima.workspaceModel": "claude-3.5-sonnet"
}

Workspace-specific context hints.

Type: string[] Default: [] Scope: Workspace

Description: Additional context to include when generating responses in this workspace.

Example:

{
"feima.workspaceContext": [
"This is a TypeScript project using React",
"Follow ESLint rules in .eslintrc.json"
]
}

Custom API endpoint.

Type: string | null Default: null Scope: Application

Description: Override the default Feima API endpoint. Only use if instructed by support.

Example:

{
"feima.apiEndpoint": "https://api.feimacode.cn"
}

Custom authentication endpoint.

Type: string | null Default: null Scope: Application

Description: Override the default Feima IDP endpoint. Only use if instructed by support.

Example:

{
"feima.authEndpoint": "https://idp.feimacode.cn"
}

Proxy URL for API requests.

Type: string | null Default: null Scope: Application

Description: HTTP proxy URL for API requests.

Example:

{
"feima.proxyUrl": "http://proxy.example.com:8080"
}

Enable token encryption.

Type: boolean Default: true Scope: Application

Description: Encrypt stored tokens. Do not disable unless required for debugging.

Example:

{
"feima.tokenEncryption": false
}

Store conversation history.

Type: boolean Default: true Scope: Application

Description: Store conversation history locally for context. Disable to save disk space.

Example:

{
"feima.storeHistory": false
}

Maximum history entries.

Type: number Default: 100 Scope: Application Minimum: 0 Maximum: 1000

Description: Maximum number of conversation history entries to store.

Example:

{
"feima.maxHistorySize": 50
}

Extension theme.

Type: string Default: "auto" Scope: Window

Valid Values:

  • "auto" - Match VS Code theme
  • "light" - Force light theme
  • "dark" - Force dark theme

Example:

{
"feima.theme": "auto"
}

Use compact UI mode.

Type: boolean Default: false Scope: Window

Description: Enable compact mode for the UI elements.

Example:

{
"feima.compactMode": true
}

Enable experimental features.

Type: boolean Default: false Scope: Application

Description: Enable experimental features that are still in development.

Example:

{
"feima.experimentalFeatures": true
}

Show beta/unstable models.

Type: boolean Default: false Scope: Window

Description: Include beta and experimental models in the model list.

Example:

{
"feima.betaModels": true
}

Settings are applied in this order (higher priority overrides lower):

  1. Workspace settings (.vscode/settings.json)
  2. User settings (settings.json)
  3. Default values

Main configuration file. Location:

  • Windows: %APPDATA%\Code\User\settings.json
  • macOS: ~/Library/Application Support/Code/User/settings.json
  • Linux: ~/.config/Code/User/settings.json

Workspace-specific configuration. Create in your project root.

Local workspace configuration. Gitignored by default.

Settings are validated on change. Invalid settings are logged to the Output panel.

Settings are automatically migrated between versions. Manual migration is not required.

To reset all settings to defaults:

// Remove all feima.* entries from settings.json
// Or use the command: "Feima: Reset Settings"