Skip to content

Conversation

@andreichirila0712
Copy link
Contributor

This adds support for AI API. (closes: #349)

Changes:

  • Created additional classes: AiSupportedModel.class to model the new resource, AiSupportedModelResponseObject.class to as a ResponseObject, and AiSupportedModelResponseList.class to map as a ResponseList;
  • Added support for the new GET endpoint (listing) per requirements;
  • Added a new JSON response file that matches the body response you would get from calling the new endpoint (for testing purposes);
  • Unit-tested the new method to ensure correct functionality.

Notes:

  • For objects such as price, or modalities and so on, I implemented them as public inner classes for AiSupportedModel.class, with addition that the ModalityConfig.class has an inner class as well, which makes it a bit nested. I considered making them "external" as separate files not necessarily since this new resource is only used in the context of this new API endpoint;
  • Any feedback regarding the implementation will be appreciated, or if any changes need to be made I will gladly work on them!

* Created additional classes: AiSupportedModel - the model, AiSupportedModelResponseObject - for mapping as a ResponseObject, and AiSupportedModelResponseList - for mapping as a ResponseList;
* Added support for the new GET endpoint per requirements;
* Added a new JSON response file  that matches the body response you would get from calling the new endpoint;
* Unit-tested the new method to ensure correct functionality.
@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.32%. Comparing base (550e91f) to head (644764f).

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #353      +/-   ##
============================================
+ Coverage     93.29%   93.32%   +0.04%     
- Complexity      904      906       +2     
============================================
  Files           202      203       +1     
  Lines          3261     3276      +15     
  Branches         70       70              
============================================
+ Hits           3042     3057      +15     
  Misses          183      183              
  Partials         36       36              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@andrii-bodnar andrii-bodnar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andreichirila0712 thank you for the contribution!

@andrii-bodnar andrii-bodnar merged commit d3eb94b into crowdin:master Dec 10, 2025
2 checks passed
@andreichirila0712 andreichirila0712 deleted the feature/349-ai-provider-models branch December 10, 2025 10:02
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.

Add support for List Supported AI Provider Models method

3 participants