Skip to content

Add Open AI completions create tool#54

Merged
g2vinay merged 36 commits intomicrosoft:mainfrom
g2vinay:ai-namespace-init
Sep 30, 2025
Merged

Add Open AI completions create tool#54
g2vinay merged 36 commits intomicrosoft:mainfrom
g2vinay:ai-namespace-init

Conversation

@g2vinay
Copy link
Copy Markdown
Contributor

@g2vinay g2vinay commented Aug 26, 2025

Adds azmcp foundry openai create-completion command for generating text completions using Azure OpenAI models deployed in Azure AI Foundry.

Command: azmcp foundry openai create-completion

  • Generate text completions with deployed Azure OpenAI models
  • Supports credential and key-based authentication
  • Configurable temperature and max tokens
  • Returns completion text with usage metrics

Key Parameters
--resource-name, --resource-group, --deployment, --prompt-text (required)
--temperature, --max-tokens, --auth-method (optional)

@g2vinay g2vinay marked this pull request as ready for review August 29, 2025 18:49
Copilot AI review requested due to automatic review settings August 29, 2025 18:49
@g2vinay g2vinay requested a review from a team as a code owner August 29, 2025 18:49
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a new OpenAI completions create tool to the Azure MCP server, enabling text generation through Azure OpenAI services. This introduces a complete new AI area with services, commands, and comprehensive testing infrastructure.

  • Registers a new AI namespace with OpenAI completion capabilities
  • Implements command structure for Azure OpenAI text generation with configurable parameters
  • Adds comprehensive unit and live testing infrastructure with Azure resource provisioning

Reviewed Changes

Copilot reviewed 24 out of 24 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
servers/Azure.Mcp.Server/src/Program.cs Registers the new AI area setup in the main server
servers/Azure.Mcp.Server/src/Azure.Mcp.Server.csproj Adds project reference to the new AI area
areas/ai/tests/test-resources.json ARM template for provisioning Azure OpenAI test resources
areas/ai/tests/test-resources.bicep Bicep template for Azure OpenAI service and deployment setup
areas/ai/tests/test-resources-post.ps1 Post-deployment verification script
areas/ai/tests/AzureMcp.Ai.UnitTests/Commands/OpenAi/OpenAiCompletionsCreateCommandTests.cs Comprehensive unit tests for the completion command
areas/ai/tests/AzureMcp.Ai.UnitTests/AzureMcp.Ai.UnitTests.csproj Unit test project configuration
areas/ai/tests/AzureMcp.Ai.LiveTests/AzureMcp.Ai.LiveTests.csproj Live test project configuration
areas/ai/tests/AzureMcp.Ai.LiveTests/AiCommandTests.cs Live integration tests against real Azure OpenAI resources
areas/ai/src/AzureMcp.Ai/Services/IAiService.cs Interface defining completion creation functionality
areas/ai/src/AzureMcp.Ai/Services/AiService.cs Implementation of Azure OpenAI completion service
areas/ai/src/AzureMcp.Ai/Options/OpenAi/OpenAiCompletionsCreateOptions.cs Command options for completion parameters
areas/ai/src/AzureMcp.Ai/Options/BaseAiOptions.cs Base options class for AI commands
areas/ai/src/AzureMcp.Ai/Options/AiOptionDefinitions.cs Command-line option definitions for AI operations
areas/ai/src/AzureMcp.Ai/Models/CompletionResult.cs Result models for completion responses
areas/ai/src/AzureMcp.Ai/GlobalUsings.cs Global using statements for the AI area
areas/ai/src/AzureMcp.Ai/Commands/OpenAi/OpenAiCompletionsCreateCommand.cs Main command implementation for creating completions
areas/ai/src/AzureMcp.Ai/Commands/BaseAiCommand.cs Base command class for AI operations
areas/ai/src/AzureMcp.Ai/Commands/AiJsonContext.cs JSON serialization context for AOT compatibility
areas/ai/src/AzureMcp.Ai/AzureMcp.Ai.csproj Main AI area project file with dependencies
areas/ai/src/AzureMcp.Ai/AssemblyInfo.cs Assembly metadata for trimming support
areas/ai/src/AzureMcp.Ai/AiSetup.cs Area setup class for dependency injection and command registration
Directory.Packages.props Adds Azure.AI.OpenAI package version
AzureMcp.sln Adds new AI area projects to the solution

Comment thread areas/ai/src/AzureMcp.Ai/AzureMcp.Ai.csproj Outdated
Comment thread areas/ai/tests/AzureMcp.Ai.LiveTests/AiCommandTests.cs Outdated
@g2vinay g2vinay force-pushed the ai-namespace-init branch from 08fda2a to 6c1e60c Compare August 29, 2025 19:00
@xiangyan99
Copy link
Copy Markdown
Member

Please update docs.

Comment thread areas/ai/tests/test-resources.bicep Outdated
Comment thread areas/ai/src/AzureMcp.Ai/Options/AiOptionDefinitions.cs Outdated
@joshfree joshfree added the Do Not Merge Do Not Merge / WIP PRs label Sep 10, 2025
@joshfree
Copy link
Copy Markdown
Member

Adding Do Not Merge to make it obvious this PR is not ready for review

Comment thread areas/ai/src/AzureMcp.Ai/Commands/OpenAi/OpenAiCompletionsCreateCommand.cs Outdated
@g2vinay g2vinay requested a review from a team as a code owner September 25, 2025 23:39
Comment thread tools/Azure.Mcp.Tools.Foundry/src/Commands/OpenAiCompletionsCreateCommand.cs Outdated
Comment thread tools/Azure.Mcp.Tools.Foundry/src/Services/FoundryService.cs Outdated
@g2vinay g2vinay merged commit 3139995 into microsoft:main Sep 30, 2025
26 checks passed
@github-project-automation github-project-automation Bot moved this from Untriaged to Done in Azure MCP Server Sep 30, 2025
colbytimm pushed a commit to colbytimm/microsoft-mcp that referenced this pull request Dec 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Do Not Merge Do Not Merge / WIP PRs server-Azure.Mcp Azure.Mcp.Server

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants