mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Fix model override bug and add client REPL sample
- InputConverter: stop propagating request.Model to ChatOptions.ModelId Hosted agents use their own model; client-provided model values like 'hosted-agent' were being passed through and causing server errors. - Add FoundryResponsesRepl sample: interactive CLI client that connects to a Foundry Responses endpoint using ResponsesClient.AsAIAgent() - Bump package version to 0.9.0-hosted.260403.1 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -157,7 +157,7 @@ public class InputConverterTests
|
||||
Assert.Equal(0.7f, options.Temperature);
|
||||
Assert.Equal(0.9f, options.TopP);
|
||||
Assert.Equal(1000, options.MaxOutputTokens);
|
||||
Assert.Equal("gpt-4o", options.ModelId);
|
||||
Assert.Null(options.ModelId);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -659,12 +659,13 @@ public class InputConverterTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ConvertToChatOptions_ModelId_SetFromRequest()
|
||||
public void ConvertToChatOptions_ModelId_NotSetFromRequest()
|
||||
{
|
||||
var request = AzureAIAgentServerResponsesModelFactory.CreateResponse(model: "my-model");
|
||||
|
||||
var options = InputConverter.ConvertToChatOptions(request);
|
||||
|
||||
Assert.Equal("my-model", options.ModelId);
|
||||
// Model from the request is intentionally NOT propagated — the hosted agent uses its own model.
|
||||
Assert.Null(options.ModelId);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user