codexprovider

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2026 License: AGPL-3.0 Imports: 19 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

View Source
const ZAIBaseURL = "https://api.z.ai/api/v1"

Variables

This section is empty.

Functions

func New

func New(options Options) (llm.Provider, error)

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

func NormalizeBaseURL(base string) string

NormalizeBaseURL accepts the root or Responses URL used by existing profiles.

func ValidateOptions

func ValidateOptions(options Options) error

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL