Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ private async Task<string> GetChatCompletion(Agent agent, List<RoleDialogModel>
}

provider = "google-ai";
model = "gemini-2.0-flash";
model = "gemini-3.8-flash";

return (provider, model);
}
Expand Down
10 changes: 5 additions & 5 deletions src/WebStarter/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -1119,7 +1119,7 @@
"Provider": "google-ai",
"Models": [
{
"Name": "gemini-2.0-flash",
"Name": "gemini-3.8-flash",
"ApiKey": "",
"Type": "chat",
"MultiModal": true,
Expand All @@ -1129,11 +1129,11 @@
"PdfReading"
],
"Cost": {
"TextInputCost": 0.0015,
"CachedTextInputCost": 0,
"TextInputCost": 0.00075,
"CachedTextInputCost": 0.000075,
"AudioInputCost": 0,
"CachedAudioInputCost": 0,
"TextOutputCost": 0.002,
"TextOutputCost": 0.00375,
"AudioOutputCost": 0
}
},
Expand Down Expand Up @@ -1368,7 +1368,7 @@
"Pdf": {
"Reading": {
"Provider": "google-ai",
"Model": "gemini-2.0-flash",
"Model": "gemini-3.8-flash",
"ConvertToImage": false,
"ImageDetailLevel": "auto",
"ImageConverter": {
Expand Down
2 changes: 2 additions & 0 deletions tests/BotSharp.Core.UnitTests/BotSharp.Core.UnitTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
<ProjectReference Include="..\..\src\Infrastructure\BotSharp.OpenAPI\BotSharp.OpenAPI.csproj" />
<!-- For StreamingToolCallReconstructionTests: the streamed tool-call reconstruction lives here. -->
<ProjectReference Include="..\..\src\Plugins\BotSharp.Plugin.OpenAI\BotSharp.Plugin.OpenAI.csproj" />
<!-- For ReadPdfFnDefaultModelTests: the PDF reading fallback model lives here. -->
<ProjectReference Include="..\..\src\Plugins\BotSharp.Plugin.FileHandler\BotSharp.Plugin.FileHandler.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
using System.Reflection;
using BotSharp.Plugin.FileHandler.Functions;
using BotSharp.Plugin.FileHandler.Settings;
using Microsoft.Extensions.Logging.Abstractions;
using Xunit;

namespace BotSharp.Core.UnitTests.Plugins;

public class ReadPdfFnDefaultModelTests
{
// Google shut down gemini-2.0-flash on 2026-06-01, so the model that ReadPdfFn
// falls back to when no FileHandler:Pdf:Reading provider and model are set
// must be one the Gemini API still serves.
[Fact]
public void Falls_back_to_a_gemini_model_that_is_still_served()
{
var fn = new ReadPdfFn(null!, NullLogger<ReadPdfFn>.Instance, new FileHandlerSettings());

var (provider, model) = ((string, string))typeof(ReadPdfFn)
.GetMethod("GetLlmProviderModel", BindingFlags.NonPublic | BindingFlags.Instance)!
.Invoke(fn, null)!;

Assert.Equal("google-ai", provider);
Assert.Equal("gemini-3.8-flash", model);
}
}