Skip to content

Suggestion: Split Requests.kt into provider-specific request files #93

Description

@adrielGGmotion

Suggestion: Split Requests.kt into provider-specific request files

Category: Large functions/files
File: composeApp/src/commonMain/kotlin/com/oak/app/network/Requests.kt

This 645-line file contains API request logic for three different providers (Gemini, OpenAI-compatible, Anthropic) all within a single Requests class. The provider-specific request methods (getGeminiModels, geminiChat, openAICompatibleChat, anthropicChat, etc.) and their corresponding error handlers and tool serializers are interleaved, making the file harder to maintain.

Suggested action: Split the file by provider — extract Gemini, OpenAI-compatible, and Anthropic request logic into dedicated files (e.g., GeminiRequests.kt, OpenAIRequests.kt, AnthropicRequests.kt) with shared types like ServiceCredentials kept in a base file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    suggestionAI-generated code improvement suggestion

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions