Skip to content

feat: add ELEVENLABS provider and bump version to 0.2.5#35

Merged
Kamilbenkirane merged 2 commits into
mainfrom
feat/add-elevenlabs-provider
Nov 14, 2025
Merged

feat: add ELEVENLABS provider and bump version to 0.2.5#35
Kamilbenkirane merged 2 commits into
mainfrom
feat/add-elevenlabs-provider

Conversation

@Kamilbenkirane

Copy link
Copy Markdown
Member

Adds Provider.ELEVENLABS and SPEECH_GENERATION capability to fix AttributeError when celeste-speech-generation tries to import Provider.ELEVENLABS.

Changes:

  • Add Provider.ELEVENLABS enum value
  • Add SPEECH_GENERATION capability
  • Add ElevenLabs credentials support
  • Add UnsupportedProviderError exception
  • Bump version from 0.2.4 to 0.2.5

@claude

claude Bot commented Nov 14, 2025

Copy link
Copy Markdown

PR Review: Add ElevenLabs Provider and Speech Generation Capability

Summary

This PR adds support for the ElevenLabs provider and introduces the SPEECH_GENERATION capability to the Celeste framework. The changes are well-structured and follow the existing codebase patterns.

Code Quality ✅

Strengths:

  • Consistent naming conventions: Uses lowercase enum values (elevenlabs) matching the existing pattern
  • Proper enum placement: ELEVENLABS added alphabetically in Provider enum, SPEECH_GENERATION logically grouped under "Speech" comment
  • Type safety maintained: All changes preserve the type-safe design using StrEnum
  • Clean exception hierarchy: New UnsupportedProviderError properly inherits from CredentialsError
  • Improved error handling: Replacing generic ValueError with domain-specific UnsupportedProviderError is better practice

Best Practices Followed:

  • Public API properly exported in __all__ lists
  • Docstrings updated to reflect new exception type
  • Error messages are descriptive and actionable

Potential Issues 🔍

1. Missing Test Coverage ⚠️

Critical: No tests were added for the new functionality. Based on the existing test patterns, you should add:

In tests/unit_tests/test_credentials.py:

  • Add "ELEVENLABS_API_KEY" to ENV_VAR_NAMES list (line 27)
  • Add test case in test_get_credentials_parametrized for ElevenLabs provider (line 144-169)
  • Add test case in test_has_credential_when_set for ElevenLabs (line 175-195)

In tests/unit_tests/test_exceptions.py:

  • Add test class for UnsupportedProviderError similar to other exception tests
  • Test exception message, attributes, and inheritance from CredentialsError

In tests/unit_tests/test_core.py:

  • Verify ELEVENLABS follows lowercase pattern (covered by existing parametrized test)
  • Verify SPEECH_GENERATION string conversion works correctly

2. Documentation Gap 📝

Minor: The ENV_VAR_NAMES list in test_credentials.py:27 needs updating but wasn't included in this PR. This should be added for test completeness.

3. Type Annotation Consistency 🔧

In credentials.py:104 - The error is raised with provider=provider but the exception expects a string:

raise UnsupportedProviderError(provider=provider)  # provider is Provider enum

The UnsupportedProviderError.__init__ expects provider: str, but you're passing a Provider enum. This works because Provider is a StrEnum, but it would be clearer to either:

  • Change the exception signature to accept Provider | str, or
  • Convert explicitly: raise UnsupportedProviderError(provider=str(provider))

Performance Considerations ✅

No performance concerns. The changes are minimal additions to enums and dictionaries with O(1) lookups.

Security Concerns ✅

  • Properly using SecretStr for API key storage
  • Following existing secure credential handling patterns
  • No security issues identified

Integration Concerns 🤔

Question: Speech Generation Implementation

The PR description mentions fixing an AttributeError when celeste-speech-generation tries to import Provider.ELEVENLABS. However:

  • No speech generation package exists in the current repository structure
  • No client implementation for SPEECH_GENERATION capability is visible

Recommendation: This suggests speech generation is being developed in a separate package. Ensure:

  1. The speech generation package is tested with these changes
  2. A client for SPEECH_GENERATION capability will be registered
  3. Consider adding a comment or tracking issue for the full integration

Version Bump ✅

Version bump from 0.2.4 to 0.2.5 is appropriate for adding new providers/capabilities (minor feature addition).

Recommendations

High Priority

  1. Add unit tests for the new provider and exception (see specific tests above)
  2. Verify type consistency in exception handling (credentials.py:104)

Medium Priority

  1. Update test fixtures to include ELEVENLABS_API_KEY in ENV_VAR_NAMES
  2. Add integration documentation linking this PR to the speech-generation package development

Low Priority

  1. Consider adding a CHANGELOG.md entry for this version bump
  2. Verify the speech-generation package works with these changes before merging

Overall Assessment: ✅ Approve with Suggestions

The code changes are clean, follow existing patterns, and properly implement the required functionality. However, test coverage is missing, which should be added before merging to maintain code quality standards.

The implementation is solid and ready for use once tests are added. Great work following the existing codebase conventions!


Reviewed by Claude Code 🤖

@Kamilbenkirane Kamilbenkirane merged commit 0e5f5d0 into main Nov 14, 2025
33 checks passed
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