Skip to content

添加 Grok 模型支持到 OpenAI 服务 - #112

Merged
HeiSir2014 merged 1 commit into
masterfrom
heisir/feat-grok-support-5a5456
Sep 28, 2025
Merged

添加 Grok 模型支持到 OpenAI 服务#112
HeiSir2014 merged 1 commit into
masterfrom
heisir/feat-grok-support-5a5456

Conversation

@HeiSir2014

Copy link
Copy Markdown
Owner

变更内容

  • 在模型上下文限制映射中添加 Grok-4-Fast 模型支持,上下文限制为 2,000,000 tokens
  • 添加 Grok 模型变体的正则表达式模式匹配规则,支持带提供商前缀的模型名称

变更原因

  • 扩展 OpenAI 兼容服务对 Grok 系列模型的支持
  • 确保 Grok 模型能够正确识别并使用其特有的上下文长度限制

测试方法

  1. 使用 Grok-4-Fast 模型进行 API 调用
  2. 验证上下文长度限制是否正确应用为 2,000,000 tokens
  3. 测试不同格式的 Grok 模型名称(如 x-ai/grok-4-fast:free)是否能够正确匹配

@github-actions

Copy link
Copy Markdown

📊 Performance Impact Analysis

Metric Base PR Difference Change %
Build Time (s) 2 3 1 50.00%
Package Size (bytes) 112931 113002 71 .06%
CLI Startup (ms) 743 831 88 11.84%

Analysis

  • Build Time: Slower by 1s
  • Package Size: Larger by 71 bytes
  • CLI Startup: Slower by 88ms

@HeiSir2014
HeiSir2014 merged commit e5f5567 into master Sep 28, 2025
29 checks passed
@HeiSir2014
HeiSir2014 deleted the heisir/feat-grok-support-5a5456 branch September 28, 2025 18:25
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.

1 participant