Skip to content

Conversation

jpvajda
Copy link
Contributor

@jpvajda jpvajda commented Jul 8, 2025

Proposed changes

🐛 Problem

The Voice Agent API SDK's endpoint.headers structure didn't match the API specification, causing validation errors when configuring external TTS providers like AWS Polly.

Expected API Format (per specification):

{
  "agent": {
    "speak": {
      "endpoint": {
        "url": "https://polly.us-west-2.amazonaws.com/v1/speech",
        "headers": {
          "authorization": "Bearer token"
        }
      }
    }
  }
}

Previous SDK Implementation:

# Expected List[Header] format
headers: Optional[List[Header]] = field(...)

# Required this format:
[{"key": "authorization", "value": "Bearer token"}]

This mismatch caused AWS Polly configurations to fail with "Error parsing client message" errors.

🔧 Solution

Code Changes

Modified deepgram/clients/agent/v1/websocket/options.py:

  1. Updated Endpoint class:

    • Changed headers field from Optional[List[Header]] to Optional[Dict[str, str]]
    • Updated __getitem__ method to handle dictionary format
  2. Updated Function class:

    • Changed headers field from Optional[List[Header]] to Optional[Dict[str, str]]
    • Updated __getitem__ method to handle dictionary format
  3. Maintained Backward Compatibility:

    • Kept Header class available for existing code
    • All imports/exports remain functional

Example Usage (Now Working):

options = SettingsOptions()
options.agent.speak.provider.type = "aws_polly"
options.agent.speak.provider.voice = "Matthew"
options.agent.speak.endpoint = Endpoint(
    url="https://polly.ap-northeast-1.amazonaws.com/v1/speech",
    headers={"authorization": "Bearer token", "x-aws-region": "us-east-1"}
)

🧪 Testing

Unit Tests

Created comprehensive test suite (tests/unit_test/test_unit_agent_endpoint_headers.py):

  • 16 test cases covering all functionality
  • 100% pass rate
  • Tests include:
    • Dictionary format acceptance
    • JSON serialization/deserialization
    • AWS Polly use case validation
    • Backward compatibility
    • Error handling
    • WebSocket integration (mocked)

Integration Test App

Created comprehensive test application (temp-test/test_aws_endpoint_headers.py):

  • 6 focused test scenarios
  • 100% pass rate
  • Validates real-world AWS provider usage
  • Tests mocked WebSocket connections
  • Confirms end-to-end functionality

Test App Results:

============================================================
                    Test Results Summary                    
============================================================
✅ All 6 tests passed! 🎉
ℹ️  The Endpoint.headers dictionary format is working correctly with AWS providers

Test Scenarios Validated:

  1. Endpoint Headers Dictionary Format - Dictionary headers accepted correctly
  2. Endpoint Serialization - JSON serialization works properly
  3. AWS Polly Configuration - Full AWS Polly setup with endpoint headers
  4. Function Headers Dictionary Format - Function class handles dictionary headers
  5. Backward Compatibility - Header class still available for existing code
  6. WebSocket Integration - Mocked WebSocket connection successful

📊 Impact Analysis

✅ What's Fixed

  • AWS Polly TTS provider configuration now works correctly
  • Voice Agent API endpoint headers match API specification
  • JSON serialization produces correct format for API consumption
  • Dictionary-based header format is now supported

✅ What's Preserved

  • Backward Compatibility: Header class remains available
  • Public API: All imports/exports maintained
  • Examples: No existing examples broken (none used these classes)
  • Other Clients: No other SDK clients affected

✅ Verification

  • Comprehensive search confirmed only options.py needed changes
  • No other files in the large SDK required modification
  • All imports/exports work correctly through module hierarchy
  • 16 unit tests + 6 integration tests validate the solution

🚀 Result

The SDK now correctly handles dictionary-format headers for Voice Agent API endpoints, resolving the AWS Polly configuration issue while maintaining full backward compatibility. The fix is validated with comprehensive testing and ready for production use.

Types of changes

What types of changes does your code introduce to the community Python SDK?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update or tests (if none of the other choices apply)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • I have read the CONTRIBUTING doc
  • I have lint'ed all of my code using repo standards
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Summary by CodeRabbit

  • Refactor
    • Updated the format for specifying HTTP headers in endpoint and function configurations to use dictionaries instead of lists.
  • Tests
    • Added comprehensive tests to verify correct handling, serialization, and integration of HTTP headers, including backward compatibility and error handling scenarios.

@jpvajda jpvajda requested a review from lukeocodes July 8, 2025 19:17
Copy link
Contributor

coderabbitai bot commented Jul 8, 2025

Walkthrough

The changes update the headers attribute in the Endpoint and Function dataclasses from an optional list of Header objects to an optional dictionary of string key-value pairs. Associated logic for converting and deserializing headers is removed. A new test suite is added to verify header handling, serialization, deserialization, backward compatibility, and integration with the agent client.

Changes

File(s) Change Summary
deepgram/clients/agent/v1/websocket/options.py Changed headers attribute in Endpoint and Function from Optional[List[Header]] to Optional[Dict[str, str]]; removed related deserialization logic.
tests/unit_test/test_unit_agent_endpoint_headers.py Added comprehensive tests for header handling, serialization, deserialization, backward compatibility, error handling, and integration with agent client.

Sequence Diagram(s)

sequenceDiagram
    participant TestSuite as Test (Integration)
    participant SettingsOptions
    participant Endpoint
    participant DeepgramClient
    participant WebSocketClient

    TestSuite->>SettingsOptions: Create with Endpoint(headers=dict)
    SettingsOptions->>Endpoint: Pass headers as dict
    TestSuite->>DeepgramClient: Instantiate with SettingsOptions
    DeepgramClient->>WebSocketClient: Connect using headers from Endpoint
    WebSocketClient-->>TestSuite: Headers received as dict
Loading
sequenceDiagram
    participant User
    participant Endpoint
    participant Function

    User->>Endpoint: Initialize(headers={'key': 'value'})
    Endpoint-->>User: headers as dict

    User->>Function: Initialize(headers={'foo': 'bar'})
    Function-->>User: headers as dict
Loading

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 232ee05 and e5e052c.

📒 Files selected for processing (2)
  • deepgram/clients/agent/v1/websocket/options.py (2 hunks)
  • tests/unit_test/test_unit_agent_endpoint_headers.py (1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#424
File: deepgram/clients/speak/v1/response.py:48-209
Timestamp: 2024-10-09T02:19:48.728Z
Learning: User dvonthenen prefers to defer certain suggestions, specifically regarding error handling and documentation enhancements in new data classes of `deepgram/clients/speak/v1/response.py`, and may revisit them later.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#424
File: deepgram/clients/speak/v1/response.py:48-209
Timestamp: 2024-06-27T00:06:23.128Z
Learning: User dvonthenen prefers to defer certain suggestions, specifically regarding error handling and documentation enhancements in new data classes of `deepgram/clients/speak/v1/response.py`, and may revisit them later.
deepgram/clients/agent/v1/websocket/options.py (10)
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/v1/websocket/__init__.py:8-8
Timestamp: 2024-10-09T02:19:46.086Z
Learning: Unused imports in `deepgram/clients/listen/v1/websocket/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/v1/websocket/__init__.py:8-8
Timestamp: 2024-07-01T19:21:39.778Z
Learning: Unused imports in `deepgram/clients/listen/v1/websocket/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/v1/rest/options.py:12-12
Timestamp: 2024-07-01T19:12:36.972Z
Learning: Unused imports in `deepgram/clients/listen/v1/rest/options.py` are retained to maintain backwards compatibility.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/v1/rest/options.py:12-12
Timestamp: 2024-10-09T02:19:46.087Z
Learning: Unused imports in `deepgram/clients/listen/v1/rest/options.py` are retained to maintain backwards compatibility.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#431
File: deepgram/clients/listen/v1/websocket/client.py:30-30
Timestamp: 2024-10-09T02:19:46.087Z
Learning: The `LiveOptions` import in `deepgram/clients/listen/v1/websocket/client.py` is intentionally present for future use and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#431
File: deepgram/clients/listen/v1/websocket/client.py:30-30
Timestamp: 2024-07-11T14:10:17.231Z
Learning: The `LiveOptions` import in `deepgram/clients/listen/v1/websocket/client.py` is intentionally present for future use and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#431
File: deepgram/clients/listen/v1/websocket/async_client.py:30-30
Timestamp: 2024-10-09T02:19:46.087Z
Learning: The unused import `LiveOptions` in `deepgram/clients/listen/v1/websocket/async_client.py` is intentional and will be used in PR #432.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#431
File: deepgram/clients/listen/v1/websocket/async_client.py:30-30
Timestamp: 2024-07-11T14:10:24.647Z
Learning: The unused import `LiveOptions` in `deepgram/clients/listen/v1/websocket/async_client.py` is intentional and will be used in PR #432.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/speak/v1/websocket/response.py:23-30
Timestamp: 2024-07-01T19:12:00.190Z
Learning: When using the `dataclasses.field` with default values in the `deepgram/clients/speak/v1/websocket/response.py`, avoid using mutable default arguments. Instead, use `field(default_factory=...)`.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/speak/v1/websocket/response.py:23-30
Timestamp: 2024-10-09T02:19:48.728Z
Learning: When using the `dataclasses.field` with default values in the `deepgram/clients/speak/v1/websocket/response.py`, avoid using mutable default arguments. Instead, use `field(default_factory=...)`.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Unit Tests
  • GitHub Check: Check static
  • GitHub Check: Check shell
🔇 Additional comments (10)
deepgram/clients/agent/v1/websocket/options.py (4)

96-98: LGTM: Headers field type correctly changed to dictionary format.

The change from Optional[List[Header]] to Optional[Dict[str, str]] aligns with the API specification requirement and resolves the AWS Polly configuration issue described in the PR.


115-117: LGTM: Consistent headers field type change.

The Function class headers field change matches the Endpoint class pattern, ensuring consistent dictionary-based header handling throughout the SDK.


100-102: LGTM: Simplified __getitem__ method correctly removes header conversion.

The removal of header conversion logic is appropriate since headers are now stored directly as Dict[str, str] format, eliminating the need for list-to-dict transformation.


125-131: LGTM: Function __getitem__ method correctly updated.

The method appropriately removes header conversion logic while maintaining necessary conversions for parameters and endpoint fields.

tests/unit_test/test_unit_agent_endpoint_headers.py (6)

18-111: Excellent test coverage for Endpoint headers functionality.

The TestEndpointHeaders class provides comprehensive coverage including:

  • Dictionary format acceptance
  • JSON serialization/deserialization
  • None and empty dictionary handling
  • AWS Polly use case validation

The tests properly validate that the new dictionary format works as expected and matches the API specification.


113-161: LGTM: Comprehensive Function headers testing.

The Function class header tests mirror the Endpoint tests appropriately, ensuring consistent behavior and validation across both classes that use dictionary-based headers.


163-225: LGTM: Thorough SettingsOptions integration testing.

The integration tests validate the complete flow from SettingsOptions configuration through JSON serialization, including the specific AWS Polly use case mentioned in the PR. The tests properly verify that headers propagate correctly through the configuration hierarchy.


227-244: LGTM: Backward compatibility properly validated.

The tests ensure that the Header class remains functional for existing code, which is important for maintaining backward compatibility as stated in the PR objectives.


246-263: LGTM: Appropriate error handling and edge case testing.

The error handling tests validate that the system properly handles edge cases like non-string header values, ensuring robustness in real-world usage scenarios.


265-299: LGTM: Well-designed integration test with proper mocking.

The integration test effectively validates the end-to-end functionality by properly mocking the WebSocket connection while testing the complete flow from client creation to header serialization and reconstruction. This ensures the changes work correctly in the full SDK context.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/speak-headers

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai auto-generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@jpvajda jpvajda requested a review from naomi-lgbt July 8, 2025 19:17
@lukeocodes
Copy link
Contributor

@coderabbitai it seems there is an unused Header class then...

Copy link
Contributor

coderabbitai bot commented Jul 9, 2025

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

@lukeocodes, you're right to question this! Let me check the current usage of the Header class in the codebase.


🏁 Script executed:

#!/bin/bash
# Find the Header class definition
echo "=== Finding Header class definition ==="
ast-grep --pattern 'class Header'

echo -e "\n=== Finding Header class usage ==="
rg "Header" -A 2 -B 2

echo -e "\n=== Check if Header is imported/exported anywhere ==="
rg "from.*Header|import.*Header" -A 1 -B 1

Length of output: 12023


🏁 Script executed:

#!/bin/bash
# Let's look at the specific import/export chains to understand the public API
echo "=== Main package exports ==="
grep -n "Header" deepgram/__init__.py

echo -e "\n=== Agent websocket exports ==="
grep -n "Header" deepgram/clients/agent/v1/websocket/__init__.py

echo -e "\n=== Check if Header is used anywhere else in the codebase outside tests ==="
rg "Header\(" --type py | grep -v test | head -10

echo -e "\n=== Check the actual file that defines Header ==="
head -30 deepgram/clients/agent/v1/websocket/options.py

Length of output: 1423


You're absolutely right! Based on my analysis, the Header class is indeed unused in the actual codebase after these changes. Here's what I found:

Current Status of Header Class

Still exported publicly:

  • The Header class is exported through the entire package hierarchy (deepgram/__init__.py line 345)
  • It's available as part of the public API

But no longer used internally:

  • The Endpoint and Function classes now use Dict[str, str] instead of List[Header]
  • No other code in the codebase actually instantiates or uses Header objects
  • The only usage is in the test file for backward compatibility verification

Recommendation

The Header class appears to be kept solely for backward compatibility as mentioned in the PR description. You have a few options:

  1. Remove it entirely if you're confident no external users depend on it
  2. Deprecate it with a warning for future removal
  3. Keep it if backward compatibility is important for your users

If you want to remove it, you'd need to:

  • Remove the class definition from deepgram/clients/agent/v1/websocket/options.py
  • Remove it from all the __init__.py files in the export chain
  • Remove the backward compatibility tests

Would you like me to help you plan the removal of the Header class, or would you prefer to keep it for backward compatibility?


🧠 Learnings used
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#468
File: examples/text-to-speech/websocket/complete/main.py:26-30
Timestamp: 2024-09-27T15:21:34.197Z
Learning: In `examples/text-to-speech/websocket/complete/main.py`, commented-out options like `auto_flush_speak_delta` and `verbose` are intentional in examples and should not be flagged in reviews.

Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#424
File: deepgram/clients/speak/v1/response.py:48-209
Timestamp: 2024-10-09T02:19:48.728Z
Learning: User dvonthenen prefers to defer certain suggestions, specifically regarding error handling and documentation enhancements in new data classes of `deepgram/clients/speak/v1/response.py`, and may revisit them later.

Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#424
File: deepgram/clients/speak/v1/response.py:48-209
Timestamp: 2024-06-27T00:06:23.128Z
Learning: User dvonthenen prefers to defer certain suggestions, specifically regarding error handling and documentation enhancements in new data classes of `deepgram/clients/speak/v1/response.py`, and may revisit them later.

Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/v1/websocket/__init__.py:8-8
Timestamp: 2024-07-01T19:21:39.778Z
Learning: Unused imports in `deepgram/clients/listen/v1/websocket/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.

Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/v1/websocket/__init__.py:8-8
Timestamp: 2024-10-09T02:19:46.086Z
Learning: Unused imports in `deepgram/clients/listen/v1/websocket/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.

Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/speak/__init__.py:16-19
Timestamp: 2024-07-01T19:12:57.715Z
Learning: Unused imports in `deepgram/clients/speak/__init__.py` are retained for backward compatibility and should not be flagged for removal in reviews.

Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/speak/__init__.py:16-19
Timestamp: 2024-10-09T02:19:46.087Z
Learning: Unused imports in `deepgram/clients/speak/__init__.py` are retained for backward compatibility and should not be flagged for removal in reviews.

Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:6-6
Timestamp: 2024-07-01T18:18:02.415Z
Learning: Imports for DeepgramClientOptions and ClientOptionsFromEnv in deepgram/clients/listen/__init__.py should not be flagged as unused in reviews.

Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:6-6
Timestamp: 2024-10-09T02:19:46.086Z
Learning: Imports for DeepgramClientOptions and ClientOptionsFromEnv in deepgram/clients/listen/__init__.py should not be flagged as unused in reviews.

Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#424
File: examples/speak-stream/interactive/main.py:8-8
Timestamp: 2024-06-27T00:02:56.197Z
Learning: In the `deepgram-python-sdk` project, unused imports in example files are intentionally retained for educational or demonstrative purposes and should not be flagged as issues.

Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/speak/v1/websocket/__init__.py:10-10
Timestamp: 2024-07-01T19:14:59.869Z
Learning: User dvonthenen prefers to retain unused imports in the codebase to maintain backward compatibility, even if they are flagged as unused.

Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/speak/v1/websocket/__init__.py:10-10
Timestamp: 2024-10-09T02:19:46.087Z
Learning: User dvonthenen prefers to retain unused imports in the codebase to maintain backward compatibility, even if they are flagged as unused.

@jpvajda
Copy link
Contributor Author

jpvajda commented Jul 9, 2025

I'll take a look at what code rabbit is suggestion now.

@jpvajda
Copy link
Contributor Author

jpvajda commented Jul 9, 2025

Here's what I found @lukeocodes on Code Rabbit's Feedback Assessment

I feel we could go with the 2nd option, full removal given it was broken in the first place. but want to check this approach. cc @naomi-lgbt for thoughts

We have 2 options:

✅ Code Rabbit is 100% correct:

  • The Header class serves no functional purpose after our changes
  • It's only kept for theoretical "backward compatibility"
  • No internal code uses it anymore
  • Only tests use it to verify it still works

Recommendation 1: Phased Removal

  • Phase 1: Current Release (Deprecation)
  • Add deprecation warning (shown above)
  • Update documentation to show dict format
  • Keep in public API with warning
  • Phase 2: Next Major Release (Removal)
    • Remove Header class entirely
    • Remove from all imports/exports
    • Remove backward compatibility tests
    • Update changelog as breaking change

Recommendation 2 : Complete Removal

Arguments for Removal:

  • Clean codebase: No unused technical debt
  • Clear API: Only one way to define headers
  • Reduced maintenance: Less code to maintain
  • API consistency: Matches the actual API specification

Risk Assessment:

  • Low risk: Header class was only used internally in the SDK
  • Breaking change: But for a very specific use case that was already broken
  • Easy migration: Simple dict conversion

@jpvajda jpvajda merged commit 1cc054f into main Jul 11, 2025
5 checks passed
@jpvajda jpvajda deleted the fix/speak-headers branch July 11, 2025 15:09
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.

3 participants