@startuml
!theme plain
package "infra-inference-llama-cpp" {
  class LlamaCppInferenceProvider
  class DefaultModelManager
  class DefaultManagedInferenceProvider
  class LlamaProcess
  class LlamaCppTokenizer
  class GbnfGrammarConverter
  package "LlamaCppApiModels" {
    class ChatCompletionRequest
    class ChatCompletionResponse
    class ChatMessage
  }
}
interface InferenceProvider <<core:inference>>
interface ModelManager <<infra-inference-commons>>
interface ManagedInferenceProvider <<infra-inference-commons>>
InferenceProvider <|.. LlamaCppInferenceProvider
ManagedInferenceProvider <|.. DefaultManagedInferenceProvider
DefaultManagedInferenceProvider --> LlamaCppInferenceProvider : delegates to
ModelManager <|.. DefaultModelManager
DefaultModelManager *--> LlamaProcess : manages
LlamaCppInferenceProvider --> LlamaCppTokenizer : uses
LlamaCppInferenceProvider --> GbnfGrammarConverter : uses
DefaultModelManager --> LlamaCppInferenceProvider : creates
GbnfGrammarConverter --> ChatCompletionRequest : generates grammar for
@enduml
