{"modulePath":"github.com/MiniMax-AI/OpenAgentCore","version":"v0.0.14","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package modelprovider\n\nPackage modelprovider validates the frozen upstream connection supplied to a native Harness.\n\n## Variables\n\n```go\nvar ErrConfiguration = errors.New(\"invalid model provider configuration\")\n```\n\n## Functions\n\n```go\nfunc SchemeAllowed(u *url.URL) bool\n```\nSchemeAllowed is the one base URL scheme rule: HTTPS, or HTTP to a loopback or private IP address, so the key never crosses a public network in plain text. A host name never qualifies for HTTP, because it can resolve anywhere.\n\n```go\nfunc TokenLimitsValid(contextWindow, maxOutputTokens int32) bool\n```\nTokenLimitsValid holds the token-limit rule: unset is zero, and an output limit never exceeds a set context window.\n\n## Types\n\n```go\ntype Protocol string\n```\n\n```go\nconst (\n\tAnthropic       Protocol = \"anthropic\"\n\tResponses       Protocol = \"responses\"\n\tChatCompletions Protocol = \"chat_completions\"\n)\n```\n\n```go\nfunc Protocols() []Protocol\n```\nProtocols is the single vocabulary of supported upstream protocol formats. The Harness catalog generator projects it to the TypeScript client.\n\n```go\nfunc (p Protocol) Valid() bool\n```\n\n```go\ntype Provider struct {\n\tProtocol        Protocol `json:\"protocol\"`\n\tBaseURL         string   `json:\"base_url\"`\n\tAPIKey          string   `json:\"api_key\"`\n\tContextWindow   int32    `json:\"context_window,omitempty\"`\n\tMaxOutputTokens int32    `json:\"max_output_tokens,omitempty\"`\n}\n```\nProvider is the confidential, frozen upstream bundle supplied by Core. Engine selection and model identity remain separate execution inputs.\n\n```go\nfunc ParseProvider(raw any) (Provider, error)\n```\n\n```go\nfunc (p Provider) Validate() error\n```\n\n","path":"github.com/MiniMax-AI/OpenAgentCore/internal/modelprovider","name":"modelprovider","synopsis":"Package modelprovider validates the frozen upstream connection supplied to a native Harness.","isRedistributable":true}
