Commit Graph

13 Commits

Author SHA1 Message Date
nogueiraguh
04e35dc681 fix: use max_completion_tokens for OpenAI models on OCI GenAI
OpenAI models reject 'max_tokens' and require 'max_completion_tokens'.
Also skip 'top_k' for OpenAI as it is unsupported. Detection is based
on the provider field in the model catalog.
2026-03-03 20:02:22 -03:00
nogueiraguh
dcd2685671 feat: add OCID resolution for all GenAI models (fixes 404 on OpenAI)
Models like OpenAI GPT-5.2 require the full OCID rather than the short
model_id. The catalog now maps model IDs to OCIDs per region (us-ashburn-1).
_call_genai and _embed_text resolve the OCID for the configured region
at runtime, falling back to short model_id for unmapped regions.

New models added from OCI portal: GPT-5.3/5.2/5.1/5 Codex, GPT Image
1/1.5, Llama Guard 4, ProtectAI DeBERTa, OpenAI Text Embedding 3
Large/Small. Total: 69 chat + 11 embedding models.
2026-03-03 19:50:55 -03:00
nogueiraguh
408ca45ee3 feat: expand GenAI catalog to 63 chat models from OCI portal
Add all models available in OCI GenAI Ashburn region including
OpenAI GPT-5.2/5.1/5/4.1/4o, o1/o3/o4-mini, GPT Audio,
xAI Grok 4.1/4 reasoning/non-reasoning variants, and update
README with complete model table and Model IDs.
2026-03-03 19:28:54 -03:00
nogueiraguh
723e2a47a1 feat: add all OCI GenAI models — 26 chat models and 9 embedding models
Complete model catalog from Oracle Cloud Infrastructure GenAI docs:
- Cohere: Command A Reasoning, Vision, A, R+, R
- Meta: Llama 4 Maverick/Scout, 3.3 70B, 3.2 90B/11B Vision, 3.1 405B
- Google: Gemini 2.5 Pro, Flash, Flash-Lite
- xAI: Grok Code Fast 1, 4.1 Fast, 4 Fast, 4, 3, 3 Mini, 3 Fast, 3 Mini Fast
- OpenAI: GPT-oss 120B, 20B
- Embeddings: Cohere Embed v4.0, English/Multilingual v3.0 + Light + Image variants
- Updated model IDs to match official OCI SDK format
2026-03-03 19:07:38 -03:00
nogueiraguh
09371cb675 feat: add in-place config editing, OpenAI GPT-oss models, and Cohere Embed v4.0
- Add PUT endpoints for editing OCI, GenAI, ADB, and MCP configurations
- Add edit buttons in all config tables with inline form pre-fill
- Add OpenAI GPT-oss 120B and 20B models to GenAI catalog
- Add Cohere Embed v4.0 (Multimodal, 1536d) to embedding catalog
- Update OCI list endpoint to return user_ocid and fingerprint for editing
- Add S.editing state management with cancel support
- Bump version to 1.4
2026-03-03 19:02:26 -03:00
nogueiraguh
880c26530c fix: prevent passphrase prompt hang in Docker by closing stdin and detecting encrypted keys
Added stdin=subprocess.DEVNULL to OCI CLI subprocess call so it fails fast
instead of hanging when a passphrase prompt would occur. Added detection of
encrypted PEM keys at upload time — rejects with clear error message if
passphrase is missing. Improved error message when passphrase-related
errors are detected during test.
2026-03-03 16:09:45 -03:00
nogueiraguh
0ca60fb017 fix: add key passphrase support for encrypted OCI private keys
Private keys with passphrase caused EOFError in Docker containers since
getpass cannot prompt without a TTY. Added optional "Key Passphrase" field
to OCI credentials form. When provided, pass_phrase is written to the OCI
config file so both the CLI and SDK can read the key without prompting.
2026-03-03 16:01:18 -03:00
nogueiraguh
5a28f0d56f feat: add persistent config logs panel and auto-fill GenAI from OCI credentials
Backend: new config_logs table with _config_log() helper, instrumented across
all test/save/upload/report/ingest endpoints (OCI, GenAI, ADB, MCP). Added
GET/DELETE /api/config-logs with filtering by type, severity, and auto-cleanup
of logs older than 30 days.

Frontend: inline "Log de Atividades" panel at the bottom of each config tab
(OCI, GenAI, ADB, MCP) with severity filter dropdown. Replaced all remaining
alert() calls in test functions with inline sm() messages. GenAI config now
auto-fills Region and Compartment OCID when selecting an OCI credential.
2026-03-03 15:21:38 -03:00
nogueiraguh
b7991d7200 feat: add dedicated Embeddings tab with report chunking and file upload
Add a new Embeddings menu in the sidebar for managing vector embeddings
separately from ADB config. Supports embedding CIS reports (chunked by
section) and uploading .txt files (chunked by paragraphs). Includes
listing and deleting individual embeddings from the ADB vector store.

- Add _chunk_report_by_section() for CIS report sectional chunking
- Add _chunk_text_file() for paragraph-based text chunking
- Add POST /api/embeddings/report/{rid} endpoint
- Add POST /api/embeddings/upload endpoint (multipart)
- Add GET /api/embeddings/{vid}/list with pagination
- Add DELETE /api/embeddings/{vid}/{doc_id}
- Add Embeddings tab in frontend with 3 cards (list, report, upload)
- Remove ingestion section from ADB Vector tab
2026-03-02 20:07:19 -03:00
nogueiraguh
2c3fb724bf feat: add RAG pipeline with OCI GenAI embeddings and ADB vector search
Integrate Retrieval-Augmented Generation into the chat flow using OCI
GenAI embed_text API and Oracle Autonomous Database vector storage.
The chat automatically queries ADB for relevant context when an active
ADB config with a linked GenAI config exists.

- Add EMBEDDING_MODELS catalog (Cohere Embed v3.0/light)
- Add _embed_text() using OCI GenAI SDK embed endpoint
- Add _vector_search() with VECTOR_DISTANCE cosine similarity
- Add _get_adb_connection(), _ensure_embeddings_table(), _build_rag_context()
- Add document ingestion endpoint (POST /api/adb/{vid}/ingest)
- Add table creation endpoint (POST /api/adb/{vid}/ensure-table)
- Modify chat endpoint with automatic RAG augmentation (non-fatal)
- Add GenAI config and embedding model selectors to ADB UI
- Add RAG status indicator in chat toolbar
- Add document ingestion section in ADB tab
2026-03-02 19:48:53 -03:00
nogueiraguh
3c1d87dde3 feat: custom Oracle AI robot logo 2026-02-27 20:20:22 -03:00
nogueiraguh
c759d0f06d feat: v2 - OCI light theme, GenAI integration, MCP servers, ADB vector 2026-02-27 18:54:38 -03:00
nogueiraguh
faf54ec611 fix: organize project structure into backend/frontend/nginx folders 2026-02-27 18:22:50 -03:00