MCPcopy Create free account
hub / github.com/anomalyco/opencode / configure

Function configure

packages/llm/src/providers/github-copilot.ts:47–61  ·  view source on GitHub ↗
(options: ModelOptions)

Source from the content-addressed store, hash-verified

45 })
46
47export const configure = (options: ModelOptions) => {
48 const responsesRoute = configuredResponsesRoute(options)
49 const chatRoute = configuredChatRoute(options)
50 const responses = (modelID: string | ModelID) =>
51 responsesRoute.with(withOpenAIOptions(modelID, defaults(options))).model({ id: modelID })
52 const chat = (modelID: string | ModelID) =>
53 chatRoute.with(withOpenAIOptions(modelID, defaults(options))).model({ id: modelID })
54 return {
55 id,
56 model: (modelID: string | ModelID) => (shouldUseResponsesApi(modelID) ? responses(modelID) : chat(modelID)),
57 responses,
58 chat,
59 configure,
60 }
61}
62
63export const provider = {
64 id,

Callers

nothing calls this directly

Calls 5

shouldUseResponsesApiFunction · 0.85
configuredResponsesRouteFunction · 0.70
configuredChatRouteFunction · 0.70
responsesFunction · 0.70
chatFunction · 0.70

Tested by

no test coverage detected