feat(ai): test saved summary model generation (#43)
This commit is contained in:
@ -100,3 +100,12 @@ func (r *Repository) ResolveSummaryModel(ctx context.Context, userID string, id
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
// GetSummaryModelForTest resolves the exact saved entry without requiring enabled,
|
||||
// an active provider, a user preference, or a known synthesis capacity profile.
|
||||
// It is read-only and belongs solely to the authenticated admin test use case.
|
||||
func (r *Repository) GetSummaryModelForTest(ctx context.Context, id string) (ResolvedSummaryModel, error) {
|
||||
var m ResolvedSummaryModel
|
||||
err := r.db.QueryRowContext(ctx, `SELECT m.id,p.id,p.name,m.model,p.endpoint,p.api_key_encrypted FROM ai_provider_models m JOIN ai_providers p ON p.id=m.provider_id WHERE m.id=$1`, id).Scan(&m.ID, &m.ProviderID, &m.Provider, &m.Model, &m.Endpoint, &m.APIKeyEncrypted)
|
||||
return m, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user