Documentation
¶
Overview ¶
Package codexprovider bridges Norma completions to the official Codex CLI. Each completion uses a fresh ephemeral thread. Codex returns descriptions of Norma tool calls; only the Norma harness is allowed to execute those calls. MaxTokens, Temperature, and Stop are context hints, not native enforced limits. OAuth uses the official Codex home and inherits its global instructions; Z.AI uses a disposable Codex home. Project instructions and environment access are disabled. Image inputs are rejected because this bridge is text-only. GLM-5.3 supports low/high/max reasoning; disabled-thinking requests use low.
Index ¶
Constants ¶
const ZAIBaseURL = "https://api.z.ai/api/v1"
Variables ¶
This section is empty.
Functions ¶
func New ¶
New validates configuration only. Login and executable readiness are checked on invocation, so saving a profile does not start a process or contact a model.
func NormalizeBaseURL ¶
NormalizeBaseURL accepts the root or Responses URL used by existing profiles.
func ValidateOptions ¶
ValidateOptions checks configuration without starting Codex or reading login credentials. Only subscription OAuth and the pinned Z.AI provider are allowed.
Types ¶
type Options ¶
type Options struct {
Model, BaseURL, APIKey, ReasoningEffort string
LocalLLMOnly bool
PolicyResolver func() (bool, []string)
}
Options selects a Codex model and its official provider configuration. Empty BaseURL uses the existing Codex ChatGPT login, never an extracted token. PolicyResolver is checked before every invocation; CIDRs cannot make this cloud-only provider local. Proxy configuration is unsupported by this bridge.