modelaccesspolicy

package
v0.16.4 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MigrateAgentAllowedModels

func MigrateAgentAllowedModels(req router.Request, _ router.Response) error

MigrateAgentAllowedModels ensures that the default agent's AllowedModels fields are cleared. This enables owners and admins to control model access for threads with ModelAccessPolicies. This handler also preserves the existing AllowedModels as a "user wildcard" MAP, ensuring that users retain access to models they were previously allowed to use. Custom agents are not migrated since they have minimal user support and non-standard configurations. Once the migration is complete, clearing AllowedModels prevents this handler from running again and allows threads descended from the agent to use models granted via ModelAccessPolicies.

func MigrateAgentDefaultModel

func MigrateAgentDefaultModel(req router.Request, _ router.Response) error

MigrateAgentDefaultModel ensures that the default agent's default model field is cleared. This handler will attempt to update the "LLM" DefaultModelAlias to point to the default model specified by the agent (if any). In most cases, this should preserve the default model used when creating and invoking threads.

func PruneModels

func PruneModels(req router.Request, _ router.Response) error

PruneModels ensures invalid and ineffectual model resources are removed from ModelAccessPolicies. This handler removes: - Models that no longer exist - Duplicates - Explicit model references when a wildcard is present

Types

This section is empty.

Jump to

Keyboard shortcuts

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