Sign in

    vectie/moonfish/model does not have a README file

    ContextBudgetInput

    pub(all) struct ContextBudgetInput {
    run_id : String
    stage :
    ModelStage

    model : String
    gateway : ModelGateway
    packet :
    PromptPacket

    reserved_completion_tokens : Int
    max_prompt_ratio_percent : Int
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    ContextBudgetPlan

    pub(all) struct ContextBudgetPlan {
    run_id : String
    stage :
    ModelStage

    model : String
    context_window : Int
    estimated_prompt_tokens : Int
    reserved_completion_tokens : Int
    max_prompt_tokens : Int
    available_prompt_tokens : Int
    total_estimated_tokens : Int
    prune_required : Bool
    status : ContextBudgetStatus
    summary : String
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    ContextBudgetReport

    pub(all) struct ContextBudgetReport {
    run_id : String
    ok : Bool
    plans : Array[ContextBudgetPlan]
    summary : String
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    ContextBudgetStatus

    pub(all) enum ContextBudgetStatus {
    ContextFits
    ContextNeedsPruning
    ContextTooLarge
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    ContextBudgetStatus::label

    fn ContextBudgetStatus::label(self : ContextBudgetStatus) -> String

    ModelCallRequest

    pub(all) struct ModelCallRequest {
    run_id : String
    stage :
    ModelStage

    model : String
    base_url : String
    schema_id : String
    messages : Array[
    PromptMessage
    ]
    required_tools : Array[String]
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    ModelCatalogEntry

    pub(all) struct ModelCatalogEntry {
    id : String
    owner : String?
    context_window : Int?
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    ModelGateway

    pub(all) struct ModelGateway {
    provider : ModelProvider
    base_url : String
    openai_base_url : String
    default_model : String
    health : ModelHealth
    catalog : Array[ModelCatalogEntry]
    usage : ModelUsageSnapshot
    contracts : Array[SuiteIntegrationContract]
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    ModelHealth

    pub(all) enum ModelHealth {
    Ready
    Degraded
    Unavailable
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    ModelProvider

    pub(all) enum ModelProvider {
    MoonGate
    OpenAICompatible
    FixtureProvider
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    ModelUsageSnapshot

    pub(all) struct ModelUsageSnapshot {
    prompt_tokens_used : Int
    completion_tokens_used : Int
    total_tokens_used : Int
    quota_remaining : Int?
    quota_exhausted : Bool
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    ProviderError

    pub(all) struct ProviderError {
    kind : ProviderErrorKind
    status_code : Int?
    retryable : Bool
    normalized_message : String
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    ProviderErrorKind

    pub(all) enum ProviderErrorKind {
    ProviderAuthFailed
    ProviderQuotaExhausted
    ProviderRateLimited
    ProviderUnavailable
    ProviderBadRequest
    ProviderUnknown
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    SuiteIntegrationContract

    pub(all) struct SuiteIntegrationContract {
    name : String
    path : String
    ready : Bool
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    SuiteStatusRef

    pub(all) struct SuiteStatusRef {
    status_path : String
    openai_base_url : String
    default_model : String
    ready : Bool
    catalog : Array[ModelCatalogEntry]
    usage : ModelUsageSnapshot
    contracts : Array[SuiteIntegrationContract]
    health_message : String?
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    SuiteStatusRef::contract_issue_count

    fn SuiteStatusRef::contract_issue_count(self : SuiteStatusRef) -> Int

    SuiteStatusRef::to_gateway

    fn SuiteStatusRef::to_gateway(self : SuiteStatusRef) -> ModelGateway

    context_budget_input

    fn context_budget_input(run_id : String, gateway : ModelGateway, packet :
    PromptPacket
    , model? : String, reserved_completion_tokens? : Int, max_prompt_ratio_percent? : Int) -> ContextBudgetInput

    context_budget_report

    fn context_budget_report(run_id : String, plans : Array[ContextBudgetPlan]) -> ContextBudgetReport

    context_budget_validation

    estimate_prompt_tokens

    fn estimate_prompt_tokens(packet :
    PromptPacket
    ) -> Int

    fixture_gateway

    fn fixture_gateway(model? : String) -> ModelGateway

    model_call_request

    fn model_call_request(run_id : String, gateway : ModelGateway, packet :
    PromptPacket
    , model? : String) -> ModelCallRequest

    model_call_response

    fn model_call_response(request : ModelCallRequest, content : String, reasoning_content? : String, usage? :
    ModelUsage
    , health? : ModelHealth) -> ModelCallResponse

    model_catalog_entry

    fn model_catalog_entry(id : String, owner? : String, context_window? : Int) -> ModelCatalogEntry

    model_usage_snapshot

    fn model_usage_snapshot(prompt_tokens_used? : Int, completion_tokens_used? : Int, quota_remaining? : Int) -> ModelUsageSnapshot

    moongate_gateway

    fn moongate_gateway(openai_base_url : String, default_model : String, health? : ModelHealth, catalog? : Array[ModelCatalogEntry], usage? : ModelUsageSnapshot, contracts? : Array[SuiteIntegrationContract]) -> ModelGateway

    moongate_suite_status_ref

    fn moongate_suite_status_ref(status_path : String, openai_base_url : String, default_model : String, ready? : Bool, catalog? : Array[ModelCatalogEntry], usage? : ModelUsageSnapshot, contracts? : Array[SuiteIntegrationContract], health_message? : String) -> SuiteStatusRef

    moonsuite_suite_status_path

    fn moonsuite_suite_status_path(root? : String) -> String

    normalize_provider_error

    fn normalize_provider_error(message : String, status_code? : Int) -> ProviderError

    prepare_context_budget_plan

    fn prepare_context_budget_plan(input : ContextBudgetInput) -> ContextBudgetPlan

    suite_integration_contract

    fn suite_integration_contract(name : String, path : String, ready? : Bool) -> SuiteIntegrationContract

    suite_status_ref

    fn suite_status_ref(status_path : String, openai_base_url : String, default_model : String, ready? : Bool, catalog? : Array[ModelCatalogEntry], usage? : ModelUsageSnapshot, contracts? : Array[SuiteIntegrationContract], health_message? : String) -> SuiteStatusRef