Skip to content

Conversation

@Aias00
Copy link
Contributor

@Aias00 Aias00 commented Sep 14, 2025

refer: https://inference-docs.cerebras.ai/introduction

  • Implemented the Cerebras provider with necessary request and response handling.
  • Added configuration validation and default capabilities for the Cerebras service.
  • Included unit tests for configuration parsing, request headers, request body, response headers, and response body handling.
  • Updated README and documentation to reflect the new provider and its usage examples.

Ⅰ. Describe what this PR did

Ⅱ. Does this pull request fix one issue?

Ⅲ. Why don't you add test cases (unit test/integration test)?

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews


refer: https://inference-docs.cerebras.ai/introduction

  • Implemented the Cerebras provider with necessary request and response handling.
  • Added configuration validation and default capabilities for the Cerebras service.
  • Included unit tests for configuration parsing, request headers, request body, response headers, and response body handling.
  • Updated README and documentation to reflect the new provider and its usage examples.

Ⅰ. Describe what this PR did

Ⅱ. Does this pull request fix one issue?

Ⅲ. Why don't you add test cases (unit test/integration test)?

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

…and tests

- Implemented the Cerebras provider with necessary request and response handling.
- Added configuration validation and default capabilities for the Cerebras service.
- Included unit tests for configuration parsing, request headers, request body, response headers, and response body handling.
- Updated README and documentation to reflect the new provider and its usage examples.
@github-actions github-actions bot changed the title feat(cerebras): add support for Cerebras provider feat(cerebras): add support for Cerebras provider || feat(cerebras): add support for Cerebras provider Sep 14, 2025
@lingma-agents
Copy link

lingma-agents bot commented Sep 14, 2025

新增 Cerebras 供应商支持并更新文档

变更概述
  • 新功能
    • 新增对 Cerebras AI 供应商的支持,包括请求和响应处理逻辑。
    • 实现了 Cerebras 供应商的配置验证和默认能力设置。
    • 添加了针对 Cerebras 的单元测试,覆盖配置解析、请求头、请求体、响应头和响应体处理。
  • 文档
    • 在中文和英文 README 中添加了 Cerebras 供应商的配置说明和使用示例。
    • 更新了供应商配置字段的详细说明表格。
    • 添加了 Cerebras 服务的 OpenAI 协议代理使用示例,包括配置、请求和响应示例。
变更文件
文件路径 变更说明
plugins/​wasm-go/​extensions/​ai-proxy/​README.​md 更新了 README 文档,添加了 Cerebras 供应商的相关配置说明和使用示例。更新了供应商配置字段的详细说明表格,并添加了 Cerebras 服务的 OpenAI 协议代理使用示例。
plugins/​wasm-go/​extensions/​ai-proxy/​README_​EN.​md 更新了英文 README 文档,添加了 Cerebras 供应商的相关配置说明和使用示例。更新了供应商配置字段的详细说明表格,并添加了 Cerebras 服务的 OpenAI 协议代理使用示例。

💡 小贴士

与 lingma-agents 交流的方式

📜 直接回复评论
直接回复本条评论,lingma-agents 将自动处理您的请求。例如:

  • 在当前代码中添加详细的注释说明。

  • 请详细介绍一下你说的 LRU 改造方案,并使用伪代码加以说明。

📜 在代码行处标记
在文件的特定位置创建评论并 @lingma-agents。例如:

  • @lingma-agents 分析这个方法的性能瓶颈并提供优化建议。

  • @lingma-agents 对这个方法生成优化代码。

📜 在讨论中提问
在任何讨论中 @lingma-agents 来获取帮助。例如:

  • @lingma-agents 请总结上述讨论并提出解决方案。

  • @lingma-agents 请根据讨论内容生成优化代码。

@codecov-commenter
Copy link

codecov-commenter commented Sep 14, 2025

Codecov Report

❌ Patch coverage is 84.81481% with 41 lines in your changes missing coverage. Please review.
✅ Project coverage is 48.43%. Comparing base (ef31e09) to head (6ff6320).
⚠️ Report is 745 commits behind head on main.

Files with missing lines Patch % Lines
...s/wasm-go/extensions/ai-proxy/provider/cerebras.go 42.25% 34 Missing and 7 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #2913       +/-   ##
===========================================
+ Coverage   35.91%   48.43%   +12.52%     
===========================================
  Files          69      138       +69     
  Lines       11576    25897    +14321     
===========================================
+ Hits         4157    12543     +8386     
- Misses       7104    12848     +5744     
- Partials      315      506      +191     
Flag Coverage Δ
wasm-go-plugin-ai-proxy 52.18% <84.81%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...s/wasm-go/extensions/ai-proxy/provider/provider.go 55.82% <ø> (ø)
...ugins/wasm-go/extensions/ai-proxy/test/cerebras.go 100.00% <100.00%> (ø)
...s/wasm-go/extensions/ai-proxy/provider/cerebras.go 42.25% <42.25%> (ø)

... and 133 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

…ider capabilities

- Updated the cerebrasProviderInitializer methods to use a consistent receiver name.
- Enhanced the ValidateConfig method to check for nil apiTokens.
- Added contextCache to the cerebrasProvider for improved request handling.
- Introduced GetApiName method for better API name resolution based on request paths.
@johnlanni
Copy link
Collaborator

@Aias00 Please fix the conflicts

# Conflicts:
#	plugins/wasm-go/extensions/ai-proxy/main_test.go
#	plugins/wasm-go/extensions/ai-proxy/provider/provider.go
@Aias00
Copy link
Contributor Author

Aias00 commented Sep 22, 2025

@Aias00 Please fix the conflicts

done

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.

3 participants