Skip to content

Commit 411aaa9

Browse files
committed
RC3.1
1 parent fa5b91e commit 411aaa9

20 files changed

Lines changed: 440 additions & 4 deletions

AgentFrameworkToolkit.sln.DotSettings

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=AI/@EntryIndexedValue">AI</s:String>
33
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=MCP/@EntryIndexedValue">MCP</s:String>
44
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=XAI/@EntryIndexedValue">XAI</s:String>
5+
<s:Boolean x:Key="/Default/UserDictionary/Words/=Cerebras/@EntryIndexedValue">True</s:Boolean>
56
<s:Boolean x:Key="/Default/UserDictionary/Words/=MEAI/@EntryIndexedValue">True</s:Boolean>
67
<s:Boolean x:Key="/Default/UserDictionary/Words/=xhigh/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>

AgentFrameworkToolkit.slnx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<Project Path="src/AgentFrameworkToolkit.AmazonBedrock/AgentFrameworkToolkit.AmazonBedrock.csproj" />
44
<Project Path="src/AgentFrameworkToolkit.Anthropic/AgentFrameworkToolkit.Anthropic.csproj" />
55
<Project Path="src/AgentFrameworkToolkit.AzureOpenAI/AgentFrameworkToolkit.AzureOpenAI.csproj" />
6+
<Project Path="src/AgentFrameworkToolkit.Cerebras/AgentFrameworkToolkit.Cerebras.csproj" />
67
<Project Path="src/AgentFrameworkToolkit.Cohere/AgentFrameworkToolkit.Cohere.csproj" />
78
<Project Path="src/AgentFrameworkToolkit.GitHub/AgentFrameworkToolkit.GitHub.csproj" />
89
<Project Path="src/AgentFrameworkToolkit.Google/AgentFrameworkToolkit.Google.csproj" />

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
# Changelog - Agent Framework Toolkit
22

3-
## Unreleased
3+
## Version 1.0.0-rc3.1 (8th of March 2026)
44
- Anthropic: Added Support for Structured Output (custom implementation as Anthropic doe not adhere to common practice, but outcome is the same).
55
- Update the various Model Constants with the latest releases
66
- AzureOpenAI: Endpoint Pattern `https://<name>.openai.azure.com/openai/v1` is now also auto-corrected by default (to: `https://<name>.openai.azure.com`)
77
- Added `AgentSession.GetMessages()` extension method for easier discoverability on getting messages from a session (Require that session belong to an agent that use the default InMemoryChatHistory)
8+
- Added Cerebras provider (`AgentFrameworkToolkit.Cerebras`)
89

910
---
1011

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ The following providers are currently supported (check out the individual README
2828
| **Amazon Bedrock** | `AgentFactory`, `AIToolsFactory` | [![NuGet](https://img.shields.io/badge/NuGet-blue?style=for-the-badge)](https://www.nuget.org/packages/AgentFrameworkToolkit.AmazonBedrock) | [![README](https://img.shields.io/badge/-README-gray?style=for-the-badge)](https://github.com/rwjdk/AgentFrameworkToolkit/tree/main/src/AgentFrameworkToolkit.AmazonBedrock/README.md) |
2929
| **Anthropic (Claude)** | `AgentFactory`, `AIToolsFactory` | [![NuGet](https://img.shields.io/badge/NuGet-blue?style=for-the-badge)](https://www.nuget.org/packages/AgentFrameworkToolkit.Anthropic) | [![README](https://img.shields.io/badge/-README-gray?style=for-the-badge)](https://github.com/rwjdk/AgentFrameworkToolkit/tree/main/src/AgentFrameworkToolkit.Anthropic/README.md) |
3030
| **Azure OpenAI** | `AgentFactory`, `AIToolsFactory`, `EmbeddingFactory` | [![NuGet](https://img.shields.io/badge/NuGet-blue?style=for-the-badge)](https://www.nuget.org/packages/AgentFrameworkToolkit.AzureOpenAI) | [![README](https://img.shields.io/badge/-README-gray?style=for-the-badge)](https://github.com/rwjdk/AgentFrameworkToolkit/tree/main/src/AgentFrameworkToolkit.AzureOpenAI/README.md) |
31+
| **Cerebras** | `AgentFactory`, `AIToolsFactory` | [![NuGet](https://img.shields.io/badge/NuGet-blue?style=for-the-badge)](https://www.nuget.org/packages/AgentFrameworkToolkit.Cerebras) | [![README](https://img.shields.io/badge/-README-gray?style=for-the-badge)](https://github.com/rwjdk/AgentFrameworkToolkit/tree/main/src/AgentFrameworkToolkit.Cerebras/README.md) |
3132
| **Cohere** | `AgentFactory`, `AIToolsFactory` | [![NuGet](https://img.shields.io/badge/NuGet-blue?style=for-the-badge)](https://www.nuget.org/packages/AgentFrameworkToolkit.Cohere) | [![README](https://img.shields.io/badge/-README-gray?style=for-the-badge)](https://github.com/rwjdk/AgentFrameworkToolkit/tree/main/src/AgentFrameworkToolkit.Cohere/README.md) |
3233
| **GitHub Models** | `AgentFactory`, `AIToolsFactory` | [![NuGet](https://img.shields.io/badge/NuGet-blue?style=for-the-badge)](https://www.nuget.org/packages/AgentFrameworkToolkit.GitHub) | [![README](https://img.shields.io/badge/-README-gray?style=for-the-badge)](https://github.com/rwjdk/AgentFrameworkToolkit/tree/main/src/AgentFrameworkToolkit.GitHub/README.md) |
3334
| **Google (Gemini)** | `AgentFactory`, `AIToolsFactory` | [![NuGet](https://img.shields.io/badge/NuGet-blue?style=for-the-badge)](https://www.nuget.org/packages/AgentFrameworkToolkit.Google) | [![README](https://img.shields.io/badge/-README-gray?style=for-the-badge)](https://github.com/rwjdk/AgentFrameworkToolkit/tree/main/src/AgentFrameworkToolkit.Google/README.md) |

development/Sandbox/Program.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010
//await Sandbox.Providers.AmazonBedrock.RunAsync();
1111
//await Sandbox.Providers.OpenAI.RunAsync();
1212
//await Sandbox.Providers.GitHub.RunAsync();
13-
//await Sandbox.Providers.Cohere.RunAsync();
14-
await AzureOpenAI.RunAsync();
13+
//await AzureOpenAI.RunAsync();
1514
//await Sandbox.Providers.Mistral.RunAsync();
1615
//await Sandbox.Providers.Google.RunAsync();
1716
//await Sandbox.Providers.XAI.RunAsync();
1817
//await Sandbox.Providers.OpenRouter.RunAsync();
18+
await Sandbox.Providers.Cerebras.RunAsync();
1919

2020
Console.WriteLine("Done");
2121
return;
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
using AgentFrameworkToolkit;
2+
using AgentFrameworkToolkit.Cerebras;
3+
using AgentFrameworkToolkit.OpenAI;
4+
using Microsoft.Agents.AI;
5+
using Secrets;
6+
7+
namespace Sandbox.Providers;
8+
9+
public static class Cerebras
10+
{
11+
public static async Task RunAsync()
12+
{
13+
Secrets.Secrets secrets = SecretsManager.GetSecrets();
14+
CerebrasAgentFactory factory = new(new CerebrasConnection
15+
{
16+
ApiKey = secrets.CerebrasApiKey,
17+
});
18+
19+
CerebrasAgent agent = factory.CreateAgent(new AgentOptions
20+
{
21+
Model = CerebrasChatModels.Llama318B,
22+
});
23+
24+
AgentResponse response = await agent.RunAsync("Hello");
25+
Console.WriteLine(response);
26+
}
27+
}

development/Sandbox/Sandbox.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
<ProjectReference Include="..\..\src\AgentFrameworkToolkit.AmazonBedrock\AgentFrameworkToolkit.AmazonBedrock.csproj" />
1919
<ProjectReference Include="..\..\src\AgentFrameworkToolkit.Anthropic\AgentFrameworkToolkit.Anthropic.csproj" />
2020
<ProjectReference Include="..\..\src\AgentFrameworkToolkit.AzureOpenAI\AgentFrameworkToolkit.AzureOpenAI.csproj" />
21+
<ProjectReference Include="..\..\src\AgentFrameworkToolkit.Cerebras\AgentFrameworkToolkit.Cerebras.csproj" />
2122
<ProjectReference Include="..\..\src\AgentFrameworkToolkit.Cohere\AgentFrameworkToolkit.Cohere.csproj" />
2223
<ProjectReference Include="..\..\src\AgentFrameworkToolkit.GitHub\AgentFrameworkToolkit.GitHub.csproj" />
2324
<ProjectReference Include="..\..\src\AgentFrameworkToolkit.Google\AgentFrameworkToolkit.Google.csproj" />

development/Secrets/Secrets.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ public record Secrets(
1313
string HuggingFaceApiKey,
1414
string OpenRouterApiKey,
1515
string CohereApiKey,
16+
string CerebrasApiKey,
1617
string ApplicationInsightsConnectionString,
1718
string GoogleGeminiApiKey,
1819
string XAiGrokApiKey,

development/Secrets/SecretsManager.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ public class SecretsManager
1919
"OpenRouterApiKet" : "todo",
2020
"OpenRouterApiKey" : "todo",
2121
"CohereApiKey" : "todo",
22+
"CerebrasApiKey" : "todo",
2223
"ApplicationInsightsConnectionString" : "todo",
2324
"GoogleGeminiApiKey" : "todo",
2425
"XAiGrokApiKey" : "todo",
@@ -51,6 +52,7 @@ public static Secrets GetSecrets()
5152
string huggingFaceApiKey = configurationRoot["HuggingFaceApiKey"] ?? string.Empty;
5253
string openRouterApiKey = configurationRoot["OpenRouterApiKey"] ?? string.Empty;
5354
string cohereApiKey = configurationRoot["CohereApiKey"] ?? string.Empty;
55+
string cerebrasApiKey = configurationRoot["CerebrasApiKey"] ?? string.Empty;
5456
string applicationInsightsConnectionString = configurationRoot["ApplicationInsightsConnectionString"] ?? string.Empty;
5557
string googleGeminiApiKey = configurationRoot["GoogleGeminiApiKey"] ?? string.Empty;
5658
string xAiGrokApiKey = configurationRoot["XAiGrokApiKey"] ?? string.Empty;
@@ -76,6 +78,7 @@ public static Secrets GetSecrets()
7678
huggingFaceApiKey,
7779
openRouterApiKey,
7880
cohereApiKey,
81+
cerebrasApiKey,
7982
applicationInsightsConnectionString,
8083
googleGeminiApiKey,
8184
xAiGrokApiKey,

development/Tests/CerebrasTests.cs

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
using AgentFrameworkToolkit.Cerebras;
2+
using Microsoft.Extensions.DependencyInjection;
3+
using Secrets;
4+
5+
namespace AgentFrameworkToolkit.Tests;
6+
7+
public sealed class CerebrasTests : TestsBase
8+
{
9+
[Fact]
10+
public Task AgentFactory_Simple_ChatClient() => SimpleAgentTestsAsync(AgentProvider.CerebrasChatClient);
11+
12+
[Fact]
13+
public Task AgentFactory_Normal_ChatClient() => NormalAgentTestsAsync(AgentProvider.CerebrasChatClient);
14+
15+
[Fact]
16+
public Task AgentFactory_OpenTelemetryAndLoggingMiddleware_ChatClient() => OpenTelemetryAndLoggingMiddlewareTestsAsync(AgentProvider.CerebrasChatClient);
17+
18+
[Fact]
19+
public Task AgentFactory_ToolCall_ChatClient() => ToolCallAgentTestsAsync(AgentProvider.CerebrasChatClient);
20+
21+
[Fact]
22+
public Task AgentFactory_McpToolCall_ChatClient() => McpToolCallAgentTestsAsync(AgentProvider.CerebrasChatClient);
23+
24+
[Fact]
25+
public Task AgentFactory_StructuredOutput_ChatClient() => StructuredOutputAgentTestsAsync(AgentProvider.CerebrasChatClient);
26+
27+
[Fact]
28+
public async Task AgentFactory_DependencyInjection()
29+
{
30+
Secrets.Secrets secrets = SecretsManager.GetSecrets();
31+
ServiceCollection services = new();
32+
services.AddCerebrasAgentFactory(secrets.CerebrasApiKey);
33+
34+
ServiceProvider provider = services.BuildServiceProvider();
35+
36+
CancellationToken cancellationToken = TestContext.Current.CancellationToken;
37+
string text = (await provider.GetRequiredService<CerebrasAgentFactory>()
38+
.CreateAgent(CerebrasChatModels.Llama318B)
39+
.RunAsync("Hello", cancellationToken: cancellationToken)).Text;
40+
Assert.NotEmpty(text);
41+
}
42+
43+
[Fact]
44+
public async Task AgentFactory_DependencyInjection_Connection()
45+
{
46+
Secrets.Secrets secrets = SecretsManager.GetSecrets();
47+
ServiceCollection services = new();
48+
services.AddCerebrasAgentFactory(new CerebrasConnection
49+
{
50+
ApiKey = secrets.CerebrasApiKey,
51+
NetworkTimeout = TimeSpan.FromSeconds(10)
52+
});
53+
54+
ServiceProvider provider = services.BuildServiceProvider();
55+
56+
CancellationToken cancellationToken = TestContext.Current.CancellationToken;
57+
string text = (await provider.GetRequiredService<CerebrasAgentFactory>()
58+
.CreateAgent(CerebrasChatModels.Llama318B)
59+
.RunAsync("Hello", cancellationToken: cancellationToken)).Text;
60+
Assert.NotEmpty(text);
61+
}
62+
}

0 commit comments

Comments
 (0)