added on local at 2026-07-01 12:34:20
| 1 | package MODS::PTMatrix::AI; | |
| 2 | #====================================================================== | |
| 3 | # DEPRECATED — global-API-key path. Kept as a stub so any stray caller | |
| 4 | # fails loudly instead of silently leaking an API call to a global key. | |
| 5 | # | |
| 6 | # All real AI calls now go through MODS::PTMatrix::AIAssist with a | |
| 7 | # per-company Anthropic key (BYOK), stored encrypted in | |
| 8 | # ai_company_settings.anthropic_api_key_enc, configured at | |
| 9 | # /ai_settings.cgi. | |
| 10 | #====================================================================== | |
| 11 | use strict; | |
| 12 | use warnings; | |
| 13 | ||
| 14 | sub is_configured { | |
| 15 | # Always false. AI availability is per-company; ask AIAssist->is_enabled | |
| 16 | # with a $company_id instead. | |
| 17 | return 0; | |
| 18 | } | |
| 19 | ||
| 20 | sub ask { | |
| 21 | # Hard refusal. Callers must use: | |
| 22 | # MODS::PTMatrix::AIAssist->new->ask_for_company( | |
| 23 | # $db, $dbh, $DB, $company_id, | |
| 24 | # system => $s, user => $u, max_tokens => $n); | |
| 25 | return undef; | |
| 26 | } | |
| 27 | ||
| 28 | 1; |