blib/lib/Langertha/Engine/TSystems.pm

filter: Statementstmt 100% 22 / 22 Branchbran n/a Conditioncond 50.0% 1 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 100% 11 / 11 Podpod 20.0% 1 / 5 totaltotal 85.3% 35 / 41 CC 2 SCAR 1.6
CC
2
Cov
96%
_build_api_key
2.1
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« blib/lib/Langertha/Engine/TranscriptionBase.pm ↑ Summary blib/lib/Langertha/Engine/MiniMax.pm »
1 package Langertha::Engine::TSystems;
2 # ABSTRACT: T-Systems AI Foundation Services (LLM Hub)
3 12 our $VERSION = '0.505';
4 12 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 12 ▶use Carp qw( croak );
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 12 extends 'Langertha::Engine::OpenAIBase';
8  
9 # StreamUsage: the LLM Server OpenAPI and the streaming guide name
10 # stream_options.include_usage (documentation-derived, not live-verified;
11 # ADR 0038).
12 12 with 'Langertha::Role::Embedding', 'Langertha::Role::Tools', 'Langertha::Role::StreamUsage';
13  
14 # NOTE (karr #184 / ADR 0024): the project has no available developer key for AIFS (the
15 # LANGERTHA_TSYSTEMS_API_KEY / test key is empty and none is obtainable), so this engine's wire
16 # behavior -- notably whether gpt-oss-120b rejects tools + a structured-output response_format -- is
17 # documentation-derived, NOT live-verified. Verify changes against docs.llmhub.t-systems.net.
18  
19  
20 has '+url' => (
21 lazy => 1,
22 9 ▶ default => sub { 'https://llm-server.llmhub.t-systems.net/v2' },
Subroutine __ANON__: called CC=1 SCAR=0.0
23 12 );
24  
25 1 ▶sub _build_api_key {
Subroutine _build_api_key: called CC=2 SCAR=7.2
26 1 my ( $self ) = @_;
27 return $ENV{LANGERTHA_TSYSTEMS_API_KEY}
28 1 ▶ || croak "".(ref $self)." requires LANGERTHA_TSYSTEMS_API_KEY or api_key set";
Condition50%1/2
$ENV{'LANGERTHA_TSYSTEMS_API_KEY'} || croak('' . ref($self) . ' requires LANGERTHA_TSYSTEMS_API_KEY or api_key set')
l!l
10
MC/DC0%0/1
$ENV{'LANGERTHA_TSYSTEMS_API_KEY'} || croak('' . ref($self) . ' requires LANGERTHA_TSYSTEMS_API_KEY or api_key set')
$ENV{'LANGERTHA_TSYSTEMS_API_KEY'}
Truth table50%1/2
A
A= $ENV{'LANGERTHA_TSYSTEMS_API_KEY'}
Aresult
11
00
29 }
30  
31 20 ▶sub default_model { 'gpt-oss-120b' }
Subroutine default_model: called CC=1 SCAR=0.0
Pod documented
32  
33 1 ▶sub default_embedding_model { 'text-embedding-bge-m3' }
Subroutine default_embedding_model: called CC=1 SCAR=0.0
Pod undocumented
34  
35 # Docs-only engine, a dimensions field is not documented or verifiable (k319).
36 2 ▶sub _embedding_dimensions_field { undef }
Subroutine _embedding_dimensions_field: called CC=1 SCAR=0.0
37  
38 18 ▶sub _build_supported_operations {[qw(
Subroutine _build_supported_operations: called CC=1 SCAR=0.0
39 createChatCompletion
40 createEmbedding
41 )]}
42  
43 # image_input (k266, ADR 0019 k266 Update): DOCS ONLY, no key exists
44 # (docs.llmhub.t-systems.net/models/vision/, llm-advisor 2026-09-25). The
45 # catch-all first row clears the flag (the default gpt-oss-120b makes no
46 # claim); the listed vision models re-assert it. The docs spell ids
47 # inconsistently (qwen-3.6-35b-fp8 vs Qwen3.6-35B-A3B-FP8), so every row is
48 # case-insensitive and tolerates a missing dash before the version. The hub
49 # documents gpt-5.4+/5.5/5.6-*, gemini-3.1-pro(-long-context), gemini-3.5-flash,
50 # claude-opus-4.8 / claude-*-5 and GLM-5.2 as TEXT-ONLY, so the gpt-5 and
51 # gemini-3 rows are pinned to the listed vision ids (gpt-5, gpt-5-mini,
52 # gpt-5-codex; gemini-3-flash, gemini-3-pro[-long-context|-image]) (k280,
53 # llm-advisor re-read 2026-09-25).
54 140 ▶sub model_capability_corrections {
Subroutine model_capability_corrections: called CC=1 SCAR=0.0
Pod undocumented
55 return (
56 140 qr/\A/ => { image_input => 0 },
57 qr/\Agemma-?4(?!\d)/i => { image_input => 1 },
58 qr/\Aglm-?5\.3-flash/i => { image_input => 1 },
59 qr/\Amistral-small-?4(?!\d)/i => { image_input => 1 },
60 qr/\Amistral-medium-?3(?!\d)/i => { image_input => 1 },
61 qr/\Aqwen-?3\.[68](?!\d)/i => { image_input => 1 },
62 qr/\Agpt-5(?:-mini|-codex)?\z/i => { image_input => 1 },
63 qr/\Aclaude-(?:[a-z]+-)?4[.-][56](?!\d)/i => { image_input => 1 },
64 qr/\Agemini-3-(?:flash|pro)\b/i => { image_input => 1 },
65 );
66 }
67  
68 # Model metadata probe (k281, ADR 0032): GET {url}/models (the /v2 base) lists
69 # data[].meta_data.input_modalities. DOCS ONLY: the shape is from the public
70 # OpenAPI document (llm-server.llmhub.t-systems.net/openapi.json); no key
71 # exists to see a real answer.
72 16 ▶sub model_metadata_format { 'tsystems' }
Subroutine model_metadata_format: called CC=1 SCAR=0.0
Pod undocumented
73 10 ▶sub model_metadata_url { $_[0]->url . $_[0]->list_models_path }
Subroutine model_metadata_url: called CC=1 SCAR=0.0
Pod undocumented
74  
75 12 __PACKAGE__->meta->make_immutable;
76  
77  
78 12 1;
79  
80 __END__
« blib/lib/Langertha/Engine/TranscriptionBase.pm ↑ Summary blib/lib/Langertha/Engine/MiniMax.pm »