Skip to content

Commit 02c8c77

Browse files
authored
Prepare 2.5.0 release (#713)
1 parent 4ca8f25 commit 02c8c77

File tree

52 files changed

+706
-619
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+706
-619
lines changed

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,26 @@
11
# Release History
22

3+
## 2.5.0 (2025-09-23)
4+
5+
### Features Added
6+
7+
- OpenAI.Responses:
8+
- Added the `Model` property to `OpenAIResponseClient`.
9+
- Added the `ServiceDescription` property to `McpTool`.
10+
- Enabled support for connectors, which are OpenAI-maintained MCP wrappers for popular services like Microsoft Outlook or Dropbox.
11+
- Added the `ConnectorId` property to `McpTool`.
12+
- Enabled support for authentication with remote MCP servers.
13+
- Added the `AuthorizationToken` property to `McpTool`.
14+
- Enabled support for the Code Interpreter tool, which allows models to write and run Python code in a sandboxed environment to solve complex problems in domains like data analysis, coding, and math.
15+
- Users can add the new `CodeInterpreterTool` to the `Tools` property of their `ResponseCreationOptions` and configure it.
16+
- Use the `Container` property to configure the sandboxed environment, including any files that should be made available.
17+
18+
### Bugs Fixed
19+
20+
- OpenAI.Responses:
21+
- Fixed an issue with the constructor of `McpToolCallApprovalRequestItem` not taking the item ID as a parameter. MCP approval requests are correlated to MCP approval responses using this ID, which implies that this ID should be required.
22+
- Fixed an issue with some of the MCP-related `StreamingResponseUpdate` classes missing the `ItemId` and `OutputIndex` properties.
23+
324
## 2.4.0 (2025-09-05)
425

526
### Features Added

api/OpenAI.net8.0.cs

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -4603,27 +4603,52 @@ public class TurnDetectionOptions : IJsonModel<TurnDetectionOptions>, IPersistab
46034603
}
46044604
namespace OpenAI.Responses {
46054605
[Experimental("OPENAI001")]
4606-
public class AutomaticCodeInterpreterContainerConfiguration : CodeInterpreterContainerConfiguration, IJsonModel<AutomaticCodeInterpreterContainerConfiguration>, IPersistableModel<AutomaticCodeInterpreterContainerConfiguration> {
4607-
public AutomaticCodeInterpreterContainerConfiguration();
4608-
public AutomaticCodeInterpreterContainerConfiguration(IEnumerable<string> fileIds = null);
4606+
public class AutomaticCodeInterpreterToolContainerConfiguration : CodeInterpreterToolContainerConfiguration, IJsonModel<AutomaticCodeInterpreterToolContainerConfiguration>, IPersistableModel<AutomaticCodeInterpreterToolContainerConfiguration> {
4607+
public AutomaticCodeInterpreterToolContainerConfiguration();
46094608
public IList<string> FileIds { get; }
4610-
protected override CodeInterpreterContainerConfiguration JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options);
4609+
protected override CodeInterpreterToolContainerConfiguration JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options);
46114610
protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options);
4612-
protected override CodeInterpreterContainerConfiguration PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options);
4611+
protected override CodeInterpreterToolContainerConfiguration PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options);
46134612
protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options);
46144613
}
46154614
[Experimental("OPENAI001")]
4615+
public class CodeInterpreterCallImageOutput : CodeInterpreterCallOutput, IJsonModel<CodeInterpreterCallImageOutput>, IPersistableModel<CodeInterpreterCallImageOutput> {
4616+
public CodeInterpreterCallImageOutput(Uri imageUri);
4617+
public Uri ImageUri { get; set; }
4618+
protected override CodeInterpreterCallOutput JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options);
4619+
protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options);
4620+
protected override CodeInterpreterCallOutput PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options);
4621+
protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options);
4622+
}
4623+
[Experimental("OPENAI001")]
4624+
public class CodeInterpreterCallLogsOutput : CodeInterpreterCallOutput, IJsonModel<CodeInterpreterCallLogsOutput>, IPersistableModel<CodeInterpreterCallLogsOutput> {
4625+
public CodeInterpreterCallLogsOutput(string logs);
4626+
public string Logs { get; set; }
4627+
protected override CodeInterpreterCallOutput JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options);
4628+
protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options);
4629+
protected override CodeInterpreterCallOutput PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options);
4630+
protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options);
4631+
}
4632+
[Experimental("OPENAI001")]
4633+
public class CodeInterpreterCallOutput : IJsonModel<CodeInterpreterCallOutput>, IPersistableModel<CodeInterpreterCallOutput> {
4634+
protected virtual CodeInterpreterCallOutput JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options);
4635+
protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options);
4636+
protected virtual CodeInterpreterCallOutput PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options);
4637+
protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options);
4638+
}
4639+
[Experimental("OPENAI001")]
46164640
public class CodeInterpreterCallResponseItem : ResponseItem, IJsonModel<CodeInterpreterCallResponseItem>, IPersistableModel<CodeInterpreterCallResponseItem> {
46174641
public CodeInterpreterCallResponseItem(string code);
46184642
public string Code { get; set; }
46194643
public string ContainerId { get; set; }
4620-
public IList<CodeInterpreterToolOutput> Outputs { get; }
4644+
public IList<CodeInterpreterCallOutput> Outputs { get; }
46214645
public CodeInterpreterCallStatus? Status { get; }
46224646
protected override ResponseItem JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options);
46234647
protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options);
46244648
protected override ResponseItem PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options);
46254649
protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options);
46264650
}
4651+
[Experimental("OPENAI001")]
46274652
public enum CodeInterpreterCallStatus {
46284653
InProgress = 0,
46294654
Interpreting = 1,
@@ -4632,56 +4657,31 @@ public enum CodeInterpreterCallStatus {
46324657
Failed = 4
46334658
}
46344659
[Experimental("OPENAI001")]
4635-
public class CodeInterpreterContainer : IJsonModel<CodeInterpreterContainer>, IPersistableModel<CodeInterpreterContainer> {
4636-
public CodeInterpreterContainer(CodeInterpreterContainerConfiguration containerConfiguration);
4637-
public CodeInterpreterContainer(string containerId);
4638-
public CodeInterpreterContainerConfiguration Container { get; set; }
4639-
public string ContainerId { get; set; }
4640-
protected virtual CodeInterpreterContainer JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options);
4641-
protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options);
4642-
protected virtual CodeInterpreterContainer PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options);
4643-
protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options);
4644-
}
4645-
[Experimental("OPENAI001")]
4646-
public class CodeInterpreterContainerConfiguration : IJsonModel<CodeInterpreterContainerConfiguration>, IPersistableModel<CodeInterpreterContainerConfiguration> {
4647-
public static AutomaticCodeInterpreterContainerConfiguration CreateAutomaticConfiguration(IEnumerable<string> fileIds = null);
4648-
protected virtual CodeInterpreterContainerConfiguration JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options);
4649-
protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options);
4650-
protected virtual CodeInterpreterContainerConfiguration PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options);
4651-
protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options);
4652-
}
4653-
[Experimental("OPENAI001")]
46544660
public class CodeInterpreterTool : ResponseTool, IJsonModel<CodeInterpreterTool>, IPersistableModel<CodeInterpreterTool> {
4655-
public CodeInterpreterTool(CodeInterpreterContainer container);
4656-
public CodeInterpreterContainer Container { get; }
4661+
public CodeInterpreterTool(CodeInterpreterToolContainer container);
4662+
public CodeInterpreterToolContainer Container { get; }
46574663
protected override ResponseTool JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options);
46584664
protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options);
46594665
protected override ResponseTool PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options);
46604666
protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options);
46614667
}
46624668
[Experimental("OPENAI001")]
4663-
public class CodeInterpreterToolImageOutput : CodeInterpreterToolOutput, IJsonModel<CodeInterpreterToolImageOutput>, IPersistableModel<CodeInterpreterToolImageOutput> {
4664-
public CodeInterpreterToolImageOutput(Uri imageUri);
4665-
public Uri ImageUri { get; set; }
4666-
protected override CodeInterpreterToolOutput JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options);
4667-
protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options);
4668-
protected override CodeInterpreterToolOutput PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options);
4669-
protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options);
4670-
}
4671-
[Experimental("OPENAI001")]
4672-
public class CodeInterpreterToolLogsOutput : CodeInterpreterToolOutput, IJsonModel<CodeInterpreterToolLogsOutput>, IPersistableModel<CodeInterpreterToolLogsOutput> {
4673-
public CodeInterpreterToolLogsOutput(string logs);
4674-
public string Logs { get; set; }
4675-
protected override CodeInterpreterToolOutput JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options);
4676-
protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options);
4677-
protected override CodeInterpreterToolOutput PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options);
4678-
protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options);
4669+
public class CodeInterpreterToolContainer : IJsonModel<CodeInterpreterToolContainer>, IPersistableModel<CodeInterpreterToolContainer> {
4670+
public CodeInterpreterToolContainer(CodeInterpreterToolContainerConfiguration containerConfiguration);
4671+
public CodeInterpreterToolContainer(string containerId);
4672+
public CodeInterpreterToolContainerConfiguration ContainerConfiguration { get; }
4673+
public string ContainerId { get; }
4674+
protected virtual CodeInterpreterToolContainer JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options);
4675+
protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options);
4676+
protected virtual CodeInterpreterToolContainer PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options);
4677+
protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options);
46794678
}
46804679
[Experimental("OPENAI001")]
4681-
public class CodeInterpreterToolOutput : IJsonModel<CodeInterpreterToolOutput>, IPersistableModel<CodeInterpreterToolOutput> {
4682-
protected virtual CodeInterpreterToolOutput JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options);
4680+
public class CodeInterpreterToolContainerConfiguration : IJsonModel<CodeInterpreterToolContainerConfiguration>, IPersistableModel<CodeInterpreterToolContainerConfiguration> {
4681+
public static AutomaticCodeInterpreterToolContainerConfiguration CreateAutomaticContainerConfiguration(IEnumerable<string> fileIds = null);
4682+
protected virtual CodeInterpreterToolContainerConfiguration JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options);
46834683
protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options);
4684-
protected virtual CodeInterpreterToolOutput PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options);
4684+
protected virtual CodeInterpreterToolContainerConfiguration PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options);
46854685
protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options);
46864686
}
46874687
[Experimental("OPENAICUA001")]
@@ -5598,7 +5598,7 @@ public class ResponseTokenUsage : IJsonModel<ResponseTokenUsage>, IPersistableMo
55985598
}
55995599
[Experimental("OPENAI001")]
56005600
public class ResponseTool : IJsonModel<ResponseTool>, IPersistableModel<ResponseTool> {
5601-
public static CodeInterpreterTool CreateCodeInterpreterTool(CodeInterpreterContainer container);
5601+
public static CodeInterpreterTool CreateCodeInterpreterTool(CodeInterpreterToolContainer container);
56025602
[Experimental("OPENAICUA001")]
56035603
public static ComputerTool CreateComputerTool(ComputerToolEnvironment environment, int displayWidth, int displayHeight);
56045604
public static FileSearchTool CreateFileSearchTool(IEnumerable<string> vectorStoreIds, int? maxResultCount = null, FileSearchToolRankingOptions rankingOptions = null, BinaryData filters = null);

0 commit comments

Comments
 (0)