MCPcopy
hub / github.com/Doorman11991/smallcode / IModelProvider

Interface IModelProvider

src/compiled/providers/types.ts:81–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79}
80
81export interface IModelProvider {
82 /** Name that appears in traces and metrics. */
83 readonly name: string;
84 /** One round trip. Honors AbortSignal so the per-prompt `timeout:` works. */
85 chat(req: ChatRequest, signal?: AbortSignal): Promise<ChatResponse>;
86 /** Best-effort token count. Used only for budget gauges, never as a security boundary. */
87 countTokens(text: string): number;
88}
89
90/**
91 * Conservative tokenizer. 4 chars/token is the rule of thumb for English

Callers 14

chatMethod · 0.65
chatMethod · 0.65
prompt_code_assistFunction · 0.65
prompt_compress_historyFunction · 0.65
repair_code_assistFunction · 0.65
repair_code_assistFunction · 0.65
prompt_code_assistFunction · 0.65
prompt_compress_historyFunction · 0.65

Implementers 4

OpenAICompatProvidersrc/compiled/providers/openai_compat.t
PromptInjectProvidersrc/compiled/providers/prompt_inject.t
OpenAICompatProvidersrc/compiled/providers/openai_compat.j
PromptInjectProvidersrc/compiled/providers/prompt_inject.j

Calls

no outgoing calls

Tested by

no test coverage detected