codexcat

package
v0.1.708 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2026 License: MIT Imports: 9 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 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 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