Path in the Gestor modulos/admin-ia/
This module registers AI servers/providers, protects their API keys in the database, tests connections, and shows test history. Editing a server also exposes the global list of available Gemini models.
How to use
Open admin-ia/listar/, create at admin-ia/adicionar/, or edit at admin-ia/editar/?id=<number>. Set the name, type, and key, then choose whether it is the default for that type. The edit view can test, show the latest results, enable/disable, and delete. All three routes exist in pt-br and en; the raiz option redirects to the list if reached.
Technical reference
The page switch handles raiz, listar-servidores, adicionar-servidor, and editar-servidor. AJAX handles salvar, editar, testar_conexao, historico_testes, excluir, ativar, desativar, and salvar_modelos_globais. OpenSSL keys encrypt the API key before storage and the edit view masks it; a Gemini test decrypts it, calls generateContent through cURL, and records outcome, error, and duration. JSON defines the Gemini URL/model; gemini/<language>/data.json provides model choices. The module has no widget, template, hook, or hooks.api.
servidores_ia has id_servidores_ia, nome, tipo, padrao, chave_api, status, and dates. logs_testes_ia has id_logs_testes_ia, id_servidores_ia, data_teste, sucesso, mensagem_erro, and tempo_resposta. Code also writes ia_user_models for id_usuarios=0; no migration for that table appears among core migrations.