danielmiessler.fabric/cmd/generate_changelog/incoming/2021.txt
Justin Lecher 283a548e05 feat: address PR #2014 feedback and add configurable Azure OpenAI API version
This commit addresses all review feedback from PR #2014 and adds
configurable API version support for Azure OpenAI backend.

PR Review Fixes:
- Add URL validation with HTTPS enforcement (ISC-C7)
- Implement cancellable context in SendStream with 300s timeout (ISC-C6)
- Add response body size limit (10MB) using io.LimitReader (ISC-C12)
- Update error body truncation from 200 to 500 characters (ISC-C13)
- Lowercase error messages per Go convention (ISC-C15)
- Add file-level documentation to all backend files (ISC-C14)
- Fix Bedrock max_tokens to respect opts.MaxTokens with fallback (ISC-C5)
- Document temperature/top_p mutual exclusivity in Bedrock (ISC-C11)
- Add debug logging when empty messages are skipped (ISC-C16)
- Add error check for empty message lists across all backends
- Verify and document Vertex AI endpoint path for APIM routing (ISC-C9)
- Update Azure OpenAI API version to 2025-04-01-preview (ISC-C10)

New Feature - Configurable API Version:
- Add APIVersion field to Client struct for Azure OpenAI backend
- Add optional setup question for API version (default: 2025-04-01-preview)
- Update AzureOpenAIBackend to accept and use configurable API version
- Maintain backward compatibility: empty version defaults to 2025-04-01-preview
- Add test coverage for custom API version and backward compatibility
- Update all existing tests to work with new backend signature

Test Coverage: 89.1% (maintained from 89.0%)
All 52 tests passing (49 existing + 3 new API version tests)

Internationalization polish: add AzureAIGateway locale strings across all 10 languages

- Add `azureaigateway_*` i18n keys to all 10 locale files
- Replace hardcoded error strings with `i18n.T()` calls
- Internationalize setup question prompts for gateway configuration
- Add `errors.New` in place of `fmt.Errorf` for static error strings
- Fix `url.QueryEscape` for API version query parameter encoding
- Correct `claude-opus-4-6-v1` model ID to include `:0` suffix
- Add error case for empty Bedrock text content blocks in `ParseResponse`
- Add test for Bedrock `ParseResponse` with no text content blocks
- Add `SendStream` context limitation note as inline code comment
- Truncate debug error body log output at 2000 characters
2026-02-23 13:58:32 -08:00

8 lines
870 B
Plaintext

### PR [#2021](https://github.com/danielmiessler/Fabric/pull/2021) by [jlec](https://github.com/jlec) and [ksylvan](https://github.com/ksylvan): Enhanced Azure AI Gateway with i18n Support and documentation
- Added configurable API version support for the Azure OpenAI backend, defaulting to `2025-04-01-preview` while maintaining backward compatibility.
- Implemented URL validation with HTTPS enforcement and a cancellable context in `SendStream` with a 300-second timeout.
- Added a 10MB response body size limit using `io.LimitReader` and improved error body truncation from 200 to 500 characters.
- Added file-level documentation across all backend files and enforced lowercase error messages per Go convention.
- Fixed Bedrock `max_tokens` to correctly respect `opts.MaxTokens` with a fallback, and added error checks for empty message lists across all backends.