Skip to content

feat: Update proxy implementation with Azure OpenAI support from PR #35 #676

@rysweet

Description

@rysweet

Feature Request: Azure OpenAI Proxy Integration

Objective

Update the existing proxy implementation to integrate Azure OpenAI support from fuergaosi233/claude-code-proxy#35 while maintaining full backward compatibility with current OpenAI configurations.

Requirements

Functional Requirements:

  • Integrate code changes from claude-code-proxy PR Bring codebase to pyright type safety compliance #35
  • Add Azure OpenAI service support alongside existing OpenAI support
  • Support new reasoning models (GPT-5, O3, O4) with proper model mapping
  • Handle max_completion_tokens parameter for token limit control
  • Maintain all existing AmplIHack proxy integration points

Non-Functional Requirements:

  • Zero breaking changes for existing OpenAI users
  • Performance parity with current implementation
  • Secure credential handling for Azure configurations
  • Comprehensive error handling and logging

User Story

As a developer using AmplIHack
I want to configure Azure OpenAI as my LLM provider
So that I can leverage Azure's enterprise features while keeping my existing workflow

Technical Considerations

Architecture Impacts:

  • Extend ProxyConfig class for Azure-specific configuration parameters
  • Update ProxyManager to handle Azure OpenAI client initialization
  • Add model mapping logic for Azure deployment names
  • Integrate reasoning model support from PR Bring codebase to pyright type safety compliance #35

Dependencies:

Integration Points:

  • Current proxy configuration system
  • Model selection and routing logic
  • Authentication and credential management
  • Error handling and retry mechanisms

Acceptance Criteria

  • All existing OpenAI configurations continue to work without changes
  • Azure OpenAI configurations can be set up and function correctly
  • Model mapping works for both OpenAI and Azure deployment names
  • Reasoning models (GPT-5, O3, O4) are supported on both providers
  • max_completion_tokens parameter is handled properly
  • All existing tests pass
  • New tests added for Azure OpenAI functionality
  • Documentation updated with Azure configuration examples
  • No performance regression in existing functionality
  • Proper error messages for misconfigured Azure settings

Implementation Notes

Key Files to Modify:

  • Proxy configuration classes
  • ProxyManager initialization logic
  • Model mapping and routing functions
  • Integration with AmplIHack's proxy system

Reference Implementation:
fuergaosi233/claude-code-proxy#35

Complexity Assessment

Complexity: Medium

  • Multiple configuration paths to support
  • External dependency integration required
  • Backward compatibility constraints
  • Model mapping logic complexity

Estimated Effort: 2-3 days

Priority: High

This feature enables enterprise Azure OpenAI usage while maintaining the existing OpenAI workflow, expanding AmplIHack's deployment options significantly.

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions