Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🔑 fix: Azure Serverless Support for API Key Header & Version #4791

Merged
merged 4 commits into from
Nov 25, 2024

Conversation

danny-avila
Copy link
Owner

Summary

I implemented support for Azure serverless mode by adding proper handling of API key headers and version query parameters across all clients and endpoints.

  • Added support for api-key header in serverless mode for Azure OpenAI API requests
  • Implemented azureOpenAIApiVersion query parameter support for serverless endpoints
  • Updated Azure validation and extraction types with proper optional chaining and defaults
  • Added tests to verify serverless configurations expect azureOpenAIApiVersion
  • Fixed typing issues in Azure config validation for model groups and maps
  • Added proper null checks and default values for Azure configuration properties

Change Type

  • Bug fix (non-breaking change which fixes an issue)

Testing

I tested the changes by:

  1. Verifying API requests include proper headers and query parameters in serverless mode
  2. Running the updated test suite for Azure configurations
  3. Testing with a live Azure serverless endpoint to confirm authentication works
  4. Validating different Azure config scenarios handle optional properties correctly

Test Configuration:

endpoints:
  azureOpenAI:
    groups:
    - group: "llama318b-inference"
      apiKey: "${LLAMA318B_SERVERLESS_API_KEY}" 
      baseURL: "https://example.services.ai.azure.com/models/"
      serverless: true
      models:
        Meta-Llama-3.1-8B-Instruct: true

Checklist

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • I have made pertinent documentation changes
  • My changes do not introduce new warnings
  • I have written tests demonstrating that my changes are effective
  • Local unit tests pass with my changes

@danny-avila danny-avila merged commit e0a5f87 into main Nov 25, 2024
4 checks passed
@danny-avila danny-avila deleted the fix/azure-serverless branch November 25, 2024 18:33
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.

1 participant