feat(go-api): Langfuse API key migration behavior (#16356)

## Summary

- Align Langfuse API key set/get/delete behavior with the Python
implementation.
- Improve DAO handling for Langfuse credential save/delete flows.
- Add tests for Langfuse service error handling and API key lifecycle
behavior.
This commit is contained in:
Hz_
2026-06-25 19:25:55 +08:00
committed by GitHub
parent 46b97bd1a1
commit e290a0d23e
10 changed files with 1105 additions and 1 deletions

View File

@@ -62,6 +62,18 @@ func (TenantLangfuse) TableName() string {
return "tenant_langfuse"
}
// LangfuseInfoResponse is the GET /langfuse/api-key payload: the stored
// credentials enriched with the resolved Langfuse project id/name. Field
// order mirrors the Python filter_by_tenant_with_info dict plus project info.
type LangfuseInfoResponse struct {
TenantID string `json:"tenant_id"`
Host string `json:"host"`
SecretKey string `json:"secret_key"`
PublicKey string `json:"public_key"`
ProjectID string `json:"project_id"`
ProjectName string `json:"project_name"`
}
// MyLLM represents LLM information for a tenant with factory details
type MyLLM struct {
ID string `gorm:"column:id" json:"id"`