Repository navigation
feat(ai): update AI API to the latest docs - #424
Merged
Merged
Conversation
New methods:
- AI snippets: listAiSnippets, addAiSnippet, getAiSnippet, editAiSnippet,
deleteAiSnippet
- AI request log exports: exportAiRequestLogs,
checkAiRequestLogsExportStatus, downloadAiRequestLogsExport
- AI usage: listAiUsageMembers, getAiUsageMember
- listAllAiProviderModels (GET ai/providers/models)
- getProjectAiSettings (GET /projects/{projectId}/ai/settings)
- aiGateway{Get,Post,Put,Patch,Delete}Raw returning the provider
response body, which the API does not wrap in `data`
Updates:
- AiSetting: prompt ids, cost limits, isLimitingActive, perUserOverrides
- provider Credentials: fields of all documented provider types
- AiPrompt usage fields, completion/fine-tuning finishedAt,
AiProviderModel capabilities, AI report languageIds
- prompt completion `tools` sent as an array (aiTools) and `tool_choice`
as string or object (toolChoice)
- fine-tuning learningRateMultiplier as a number
- make AiSetting.ShortCut and AiFileTranslation.FileTranslationError public
- fix AI prompt Javadoc operation links
Deprecations: custom placeholder methods (use AI snippets), the
data-unwrapping aiGateway* methods, tools/tool_choice maps,
Long learningRateMultiplier, AiPromptAddRequest.isEnabled,
AiProviderRequest.config, AiSetting.showSuggestion/shortcuts and
prompt completion resource fields not in the API.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
andrii-bodnar
approved these changes
Oct 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of updating the SDK to the current Crowdin API docs. This PR covers the AI API.
Crowdin routes live under
/users/{userId}/…; for Enterprise, passuserId = null, the same convention as the existing AI methods.New methods (
AIApi)listAiSnippets,addAiSnippet,getAiSnippet,editAiSnippet,deleteAiSnippetai/settings/snippets[/{aiSnippetId}]exportAiRequestLogs,checkAiRequestLogsExportStatus,downloadAiRequestLogsExportai/request-logs/exports[/{exportId}[/download]]listAiUsageMembers,getAiUsageMemberai/usage/members[/{memberId}]listAllAiProviderModelsGET ai/providers/modelsgetProjectAiSettingsGET /projects/{projectId}/ai/settingsaiGatewayGetRaw/PostRaw/PutRaw/PatchRaw/DeleteRawai/providers/{aiProviderId}/gateway/{path}The snippets reuse the existing
CustomPlaceholdermodels, because the schema is identical.Updates
AiSetting: added the pre-translation, QA-check, context-review and alignment (Enterprise) prompt ids, plusdailyCostLimit,monthlyCostLimit,userDailyCostLimit,userMonthlyCostLimit,isLimitingActiveandperUserOverrides.Credentials: now holds the fields of every documented provider type: base URL and headers, Azure, Vertex AI, watsonx, Microsoft Foundry deployments, and custom AI.AiPrompt: addedcreatedBy,updatedBy,lastUsedBy,lastUsedAt,usageCount.finishedAt: added to prompt completions and fine-tuning datasets.AiProviderModel: added the model capability fields.languageIdsadded.toolsis sent as the documented array (aiTools).tool_choiceaccepts a string or an object (toolChoice).learningRateMultiplieris now a number (learningRateMultiplierValue).AiSetting.ShortCutandAiFileTranslation.FileTranslationErrorare nowpublic; they were exposed by public getters but couldn't be used.Deprecated (still working)
list/add/get/edit/deleteCustomPlaceholder): the API says to use AI snippets instead.aiGatewayGet/Post/Put/Patch/Delete: the API returns the provider's response without adatawrapper, so these returnednullor failed. Use the*Rawmethods.tools/tool_choicemaps and theLonglearningRateMultiplier.AiPromptAddRequest.isEnabledandAiProviderRequest.config.AiSetting.showSuggestion/shortcuts.AiPromptResource.filteredStringsIds/projectDescription.Backward compatibility
No public method, field or class was removed, renamed or retyped. Behaviour corrections:
setTools(Map): the value is no longer sent, because the API expects an array and there is no sensible conversion. UsesetAiTools.setTool_choice(Map): fillstoolChoice.learningRateMultiplier: theLongsetter fills the number field, so2is sent as2.0. TheLonggetter returns the value truncated to an integer (1.8 reads as1).Open questions for review
New models carry fields the API marks deprecated:
AiPromptCompletionData.eta.ProjectAiSettings.preTranslationAiPromptId.Both are annotated
@Deprecated. Decide whether to keep them (they are returned by the API) or drop them. The user-levelAiSetting.preTranslationAiPromptIdis not deprecated.Testing
./gradlew build: 660 tests, 0 failures, on both JDK 17 and JDK 8../gradlew javadocon JDK 8: no errors.tools/tool_choicerequest JSON (promptCompletionRequestWireFormatTest);learningRateMultipliervalues.🤖 Generated with Claude Code