codexcat

package
v0.1.913 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package codexcat renders models the way Codex describes them: the entries of its models.json, for `model_catalog_json` and for the model list magpie hands Codex in place of the ChatGPT backend's.

Index

Constants

This section is empty.

Variables

View Source
var Prompt string

Prompt is Codex's generic system prompt (Apache-2.0, openai/codex, core/gpt-5.2-codex_prompt.md). Third-party models need one because the bundled catalog only carries prompts for OpenAI models.

Functions

func CacheEntries

func CacheEntries() map[string]map[string]any

CacheEntries is Codex's own models, as models_cache.json describes them for the ChatGPT account it last asked with, by slug.

func Catalog

func Catalog(ms []catalog.Model) []byte

Catalog renders models as a whole models.json.

func DefaultEffort

func DefaultEffort(e []string) string

DefaultEffort picks the middle of the road: "medium" or "high" when offered, else whatever the list starts with.

func Entries

func Entries(ms []catalog.Model, after int) []any

Entries renders models as models.json entries, ranked after the first `after`. Only fields Codex requires or that change behaviour are set; the rest take Codex's defaults.

func MarkedV1 added in v0.1.715

func MarkedV1(etag string) bool

MarkedV1 reports whether an ETag is of a list magpie stamped V1.

func PolicyTag added in v0.1.715

func PolicyTag(tag string) string

PolicyTag is a list's tag with the V1 setting in it.

func Remember added in v0.1.715

func Remember(entries []any)

Remember keeps the versions of entries as the backend gave them, before any is stamped: those of slugs it names are replaced, the rest kept.

func Stamp added in v0.1.715

func Stamp(e map[string]any)

Stamp has an entry say multi-agent V1.

func Tag added in v0.1.54

func Tag(ms []catalog.Model) string

Tag names a list of magpie's models: another list, another tag.

func Tagged added in v0.1.54

func Tagged(etag, tag string) bool

Tagged reports whether an ETag carries this tag.

func V1 added in v0.1.715

func V1() bool

V1 reports whether the OpenAI models magpie hands Codex say "v1".

func Window added in v0.1.757

func Window(e map[string]any, n, most int)

Window has one of Codex's own entries say a context window of n tokens (none: as it says), and most at the most it may be raised to (0: as it says). Only those two fields change. An entry whose max_context_window is below its window — one the user set past what OpenAI lists — would say two things at once, and Codex may hold the window to the max, so the max is raised to it.

func WithTag added in v0.1.54

func WithTag(etag, tag string) string

WithTag is an ETag of the backend's (or none) with magpie's tag in it: W/"abc" becomes W/"abc+magpie-<tag>".

Types

This section is empty.

Jump to

Keyboard shortcuts

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