mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-27 07:16:19 +09:00
64378d29ed
* feat(web): add provider oauth management ui * feat: add OAuth callback support on port 1455 * feat: enhance reasoning effort options and support for OpenAI Codex OAuth * feat: update twilight-ai dependency to v0.3.4 * refactor: promote openai-codex to first-class client_type, remove auth_type Replace the previous openai-responses + metadata auth_type=openai-codex-oauth combo with a dedicated openai-codex client_type. OAuth requirement is now determined solely by client_type, eliminating the auth_type concept from the LLM provider domain entirely. - Add openai-codex to DB CHECK constraint (migration 0047) with data migration - Add ClientTypeOpenAICodex constant and dedicated SDK/probe branches - Remove AuthType from SDKModelConfig, ModelCredentials, TriggerConfig, etc. - Simplify supportsOAuth to check client_type == openai-codex - Add conf/providers/codex.yaml preset with Codex catalog models - Frontend: replace auth_type selector with client_type-driven OAuth UI --------- Co-authored-by: Acbox <acbox0328@gmail.com>
39 lines
1.1 KiB
Go
39 lines
1.1 KiB
Go
package compaction
|
|
|
|
import (
|
|
"net/http"
|
|
"time"
|
|
)
|
|
|
|
// Log represents a compaction log entry.
|
|
type Log struct {
|
|
ID string `json:"id"`
|
|
BotID string `json:"bot_id"`
|
|
SessionID string `json:"session_id,omitempty"`
|
|
Status string `json:"status"`
|
|
Summary string `json:"summary"`
|
|
MessageCount int `json:"message_count"`
|
|
ErrorMessage string `json:"error_message"`
|
|
Usage any `json:"usage,omitempty"`
|
|
ModelID string `json:"model_id,omitempty"`
|
|
StartedAt time.Time `json:"started_at"`
|
|
CompletedAt *time.Time `json:"completed_at,omitempty"`
|
|
}
|
|
|
|
// ListLogsResponse is the API response for listing compaction logs.
|
|
type ListLogsResponse struct {
|
|
Items []Log `json:"items"`
|
|
}
|
|
|
|
// TriggerConfig holds the parameters needed to trigger a compaction.
|
|
type TriggerConfig struct {
|
|
BotID string
|
|
SessionID string
|
|
ModelID string
|
|
ClientType string
|
|
APIKey string //nolint:gosec // runtime credential, not a hardcoded secret
|
|
CodexAccountID string
|
|
BaseURL string
|
|
HTTPClient *http.Client
|
|
}
|