Documentation
¶
Index ¶
- Constants
- func ConfigDir() (string, error)
- func ConfigPath() (string, error)
- func ContextWindowForModel(item api.ModelInfo, localFallback, remoteFallback int64) int64
- func IsManagedConfig() bool
- func IsManagedConfigData(data []byte) bool
- func LookupContextWindow(modelIDs ...string) (int64, bool)
- func MatchesManagedProviderConfigData(data []byte, serverURL, apiKey string) bool
- func RemoteDefaultContextWindow(fallback int64) int64
- func RemoveManagedConfig() error
- func RestoreNativeConfigData(currentData, originalData []byte, originalExisted bool) error
- func SyncConfig(serverURL, apiKey, selectedModelID string, models []api.ModelInfo) error
Constants ¶
const ( DefaultLocalContextWindow int64 = 8192 DefaultRemoteContextWindowFallback int64 = 200000 )
const (
ProviderID = "csghub_lite"
)
Variables ¶
This section is empty.
Functions ¶
func ConfigPath ¶
ConfigPath returns the path to Codex config.toml.
func ContextWindowForModel ¶
func IsManagedConfig ¶ added in v0.9.25
func IsManagedConfig() bool
IsManagedConfig reports whether the live Codex config currently selects the provider owned by csghub-lite.
func IsManagedConfigData ¶ added in v0.9.25
func LookupContextWindow ¶
func MatchesManagedProviderConfigData ¶ added in v0.9.34
MatchesManagedProviderConfigData reports whether the Codex fields owned by csghub-lite still point at the expected local provider. Unrelated Codex settings are intentionally ignored because Codex updates them independently.
func RemoveManagedConfig ¶ added in v0.9.25
func RemoveManagedConfig() error
RemoveManagedConfig removes only fields owned by legacy csghub-lite integrations. It is used when no pre-switch snapshot exists.
func RestoreNativeConfigData ¶ added in v0.9.34
RestoreNativeConfigData restores only the Codex fields managed by csghub-lite. Settings that Codex or the user changed after enabling OpenCSG remain untouched.
Types ¶
This section is empty.