package com.correx.core.inference

import com.correx.core.events.types.ProviderId

interface InferenceProvider {
    val id: ProviderId
    val name: String
    val tokenizer: Tokenizer

    suspend fun infer(request: InferenceRequest): InferenceResponse
    suspend fun healthCheck(): ProviderHealth
    fun capabilities(): Set<CapabilityScore>
}

interface ProviderRegistry {
    fun register(provider: InferenceProvider)
    fun resolve(capability: ModelCapability): List<InferenceProvider>  // ordered by score desc
    fun listAll(): List<InferenceProvider>
    suspend fun healthCheckAll(): Map<ProviderId, ProviderHealth>
}
