MCPcopy
hub / github.com/garrytan/gstack / ProviderAdapter

Interface ProviderAdapter

test/helpers/providers/types.ts:60–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58export type Family = 'claude' | 'gpt' | 'gemini';
59
60export interface ProviderAdapter {
61 /** Stable name used in output tables and config (e.g., 'claude', 'gpt', 'gemini'). */
62 readonly name: string;
63 /** Model family this adapter targets. */
64 readonly family: Family;
65 /**
66 * Check whether the provider's CLI binary is present and authenticated.
67 * Should never block >2s. Non-throwing: returns { ok: false, reason } on failure.
68 */
69 available(): Promise<AvailabilityCheck>;
70 /** Run a prompt and return normalized RunResult. Non-throwing. Errors go in result.error. */
71 run(opts: RunOpts): Promise<RunResult>;
72 /** Estimate USD cost for the reported token usage and model. */
73 estimateCost(tokens: TokenUsage, model?: string): number;
74}

Callers 10

runBenchmarkFunction · 0.65
runBenchmarkFunction · 0.65
createFixtureDbFunction · 0.65
createMacFixtureDbFunction · 0.65
createLinuxFixtureDbFunction · 0.65
runBenchmarkFunction · 0.65

Implementers 3

ClaudeAdaptertest/helpers/providers/claude.ts
GptAdaptertest/helpers/providers/gpt.ts
GeminiAdaptertest/helpers/providers/gemini.ts

Calls

no outgoing calls

Tested by

no test coverage detected