Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 22, 2026

Applies the same fixes from PR #901 (McpToolCallApprovalPolicy) to CodeInterpreterToolContainer.

Changes

  • Added implicit conversion from string (container ID) to CodeInterpreterToolContainer
  • Added implicit conversion from CodeInterpreterToolContainerConfiguration to CodeInterpreterToolContainer
  • Added Argument.AssertNotNull checks in constructors
  • Added [CodeGenVisibility] attribute to generate internal parameterless constructor

Example

// Before
CodeInterpreterToolContainer container = new(CodeInterpreterToolContainerConfiguration.CreateAutomaticContainerConfiguration());

// After - implicit conversion
CodeInterpreterToolContainer container = CodeInterpreterToolContainerConfiguration.CreateAutomaticContainerConfiguration();

// Also works with container IDs
CodeInterpreterToolContainer container = "my-container-id";

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • sqdvsblobprodcus333.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build src/OpenAI.csproj (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This PR made a few fixes to McpToolCallApprovalPolicy, which is a union of a CustomMcpToolCallApprovalPolicy and a GlobalMcpToolCallApprovalPolicy: #901

Could you make the same fixes to CodeInterpreterToolContainer, which is a union of a CodeInterpreterToolContainerConfiguration and a string container ID?


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: joseharriaga <45773732+joseharriaga@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix issues in CodeInterpreterToolContainer Add implicit conversions to CodeInterpreterToolContainer union Jan 22, 2026
Copilot AI requested a review from joseharriaga January 22, 2026 05:08
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.

2 participants