task => model */ public function get_task_models(): array; /** * Merge-safe: tasks absent from $map keep their stored model. * * @param array $map task => model */ public function update_task_models( array $map ): bool; /** Monthly soft limit of AI calls; 0 = no limit. */ public function get_monthly_limit(): int; public function set_monthly_limit( int $limit ): bool; /** * Marks which task the CURRENT request is for — get_model() then prefers * that task's override. Set by AiGenerationService right before calling * the provider, cleared right after (null). */ public function set_task_context( ?string $task ): void; /** Whether the provider's saved credentials passed a connection test. */ public function is_tested( string $provider_id ): bool; public function mark_tested( string $provider_id, bool $tested ): bool; /** * AI is "ready" when an active provider is selected, has an API key and * passed a connection test — the gate for the Dashboard AI toggle. */ public function is_ready(): bool; }