php-agentic/Services
darbs-claude c315fc43c6
Some checks failed
CI / PHP 8.3 (pull_request) Failing after 1m47s
CI / PHP 8.4 (pull_request) Failing after 1m46s
fix: validate API keys on AgenticManager init (#29)
Log a warning for each AI provider registered without an API key so
that misconfiguration is surfaced at boot time (not silently on the
first API call).  Each message names the environment variable to set:

  ANTHROPIC_API_KEY  – Claude
  GOOGLE_AI_API_KEY  – Gemini
  OPENAI_API_KEY     – OpenAI

Providers without a key remain registered but are marked unavailable
via isAvailable(), preserving backward compatibility.

- Add Log::warning() calls in registerProviders() for empty keys
- Extend AgenticManagerTest with a dedicated 'API key validation
  warnings' describe block (7 new test cases)
- Update DX-002 in TODO.md as resolved

Closes #29

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-23 11:39:01 +00:00
..
Concerns chore: fix pint code style and add test config 2026-02-23 03:50:09 +00:00
AgentApiKeyService.php chore: fix pint code style and add test config 2026-02-23 03:50:09 +00:00
AgentDetection.php refactor: rename namespace Core\Agentic to Core\Mod\Agentic 2026-01-27 16:12:58 +00:00
AgenticManager.php fix: validate API keys on AgenticManager init (#29) 2026-02-23 11:39:01 +00:00
AgenticProviderInterface.php refactor: rename namespace Core\Agentic to Core\Mod\Agentic 2026-01-27 16:12:58 +00:00
AgenticResponse.php refactor: rename namespace Core\Agentic to Core\Mod\Agentic 2026-01-27 16:12:58 +00:00
AgentSessionService.php chore: fix pint code style and add test config 2026-02-23 03:50:09 +00:00
AgentToolRegistry.php chore: fix pint code style and add test config 2026-02-23 03:50:09 +00:00
ClaudeService.php chore: fix pint code style and add test config 2026-02-23 03:50:09 +00:00
ContentService.php chore: fix pint code style and add test config 2026-02-23 03:50:09 +00:00
GeminiService.php chore: fix pint code style and add test config 2026-02-23 03:50:09 +00:00
IpRestrictionService.php refactor: rename namespace Core\Agentic to Core\Mod\Agentic 2026-01-27 16:12:58 +00:00
OpenAIService.php chore: fix pint code style and add test config 2026-02-23 03:50:09 +00:00
PlanTemplateService.php refactor: update namespaces for L1/L2 package convention 2026-01-27 17:34:46 +00:00