NAME

Langertha::Manifest::Model - One model entry of a provider manifest: id, endpoint, declared capabilities

VERSION

version 0.503

SYNOPSIS

my $model = Langertha::Manifest::Model->new(
  id           => 'gpt-5.6',
  endpoint_ref => 'chat',
  capabilities => { chat => 1, streaming => 1, tools_native => 1 },
);

$model->supports('tools_native');   # 1

DESCRIPTION

A model entry of a Langertha::Manifest. The same model id may appear once per endpoint (a proxy serves one model on several protocol endpoints), so (id, endpoint_ref) is the uniqueness key.

capabilities are what the provider claims, in the Langertha::Role::Capabilities vocabulary (engine_capabilities names). A claim is not a probe result and not a local permission.

id

The model id as the endpoint expects it (free-form, e.g. org/model:tag); non-empty, no control characters, at most 256 characters.

endpoint_ref

Id of the Langertha::Manifest::Endpoint serving this model.

capabilities

HashRef of capability name to 1/0. Names match [a-z][a-z0-9_]*; input values may be JSON booleans, \1/\0 or the numbers 1/0 and are normalized to 1/0; strings ("1", "true") are rejected. Names are open: a client treats a capability it does not know as absent.

supports

$model->supports('streaming');

True when the manifest claims the capability for this model. Accepts any name; an unknown or absent capability is simply not supported.

from_hash

Builds a model entry from its JSON object form, rejecting unknown and forbidden fields.

to_hash

Returns the JSON object form; capability values are JSON booleans.

SEE ALSO

SUPPORT

Issues

Please report bugs and feature requests on GitHub at https://github.com/Getty/langertha/issues.

IRC

Join #langertha on irc.perl.org or message Getty directly.

CONTRIBUTING

Contributions are welcome! Please fork the repository and submit a pull request.

AUTHOR

Torsten Raudssus <getty@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2026 by Torsten Raudssus https://raudssus.de/.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.