Reranker
gRPC RerankerService reference for CreateReranker, GetReranker, ListRerankers, UpdateReranker and other RPCs, with request messages, response types, and service documentation.
Services
RerankerService Service
Service for managing Rerankers in the GoodMem system.
Authentication: All methods require valid API key authentication via gRPC metadata:
- Metadata key:
authorization - Value format:
Bearer <api-key>
Global errors: All RPCs may return DEADLINE_EXCEEDED, CANCELLED, UNAVAILABLE, RESOURCE_EXHAUSTED, INTERNAL.
Authorization model:
- Every RPC evaluates a typed authorization operation against the GoodMem instance or a particular reranker.
- Ownership, code-defined role assignments, and direct grants can supply authority; an API-key ceiling may further restrict the authenticated principal's effective authority.
- Listing requires
LIST_RERANKERon the instance and returns only rerankers on which the caller hasREAD_RERANKER.
CreateReranker
Summary: Creates a new neural reranking service configuration.
| Type | |
|---|---|
| Request | goodmem.v1.CreateRerankerRequest |
| Response | goodmem.v1.Reranker |
Auth: gRPC metadata x-api-key: <api-key>
Authorization Required: CREATE_RERANKER on the proposed reranker, evaluated using its
proposed owner.
Request Parameters:
display_name(REQUIRED): User-facing name; ≤255 chars after trimmingdescription(OPTIONAL): Descriptive textprovider_type(REQUIRED): Service provider type; becomes IMMUTABLE after creationendpoint_url(REQUIRED): HTTP(S) URL; server canonicalizes (trim, lowercase scheme/host, remove default ports, strip trailing '/' from path; preserve query)api_path(OPTIONAL): API path component; if empty, defaults to "/v2/rerank" (Cohere), otherwise "/rerank"model_identifier(REQUIRED): Model name/ID; non-empty after trimmingsupported_modalities(OPTIONAL): Defaults to[TEXT]if omittedcredentials(OPTIONAL): Structured credentials; required only for SaaS providers that enforce authenticationlabels(OPTIONAL): ≤20 entries; keys/values ≤255 chars; keys[a-z0-9._-]version(OPTIONAL): Version informationmonitoring_endpoint(OPTIONAL): HTTP(S) URL for health/metricsowner_id(OPTIONAL): Proposed owner principal; defaults to the authenticated principal
Response:
- Returns the created Reranker with all fields populated
credentialsis omitted from the response; useGetRerankerwithinclude_credentials=truewhen the stored secret is required
Side Effects:
- Creates new reranker record in database
- Sets
owner_idto the authenticated principal or specified value after authorization - Sets
created_by_idfrom the authenticated actor - Performs duplicate detection using the effective provider connection, model configuration, and equivalent credentials after endpoint canonicalization and provider-default resolution
Idempotency: Not idempotent - each call creates a new reranker. Clients SHOULD NOT auto-retry blindly.
Error Codes:
UNAUTHENTICATED: Missing or invalid authenticationPERMISSION_DENIED: Caller lacksCREATE_RERANKERon the proposed rerankerINVALID_ARGUMENT: Required fields empty/missing; invalid URLs; label constraints violated;provider_typeunspecifiedALREADY_EXISTS: Another reranker for the same owner has the same effective provider connection and model configuration after endpoint canonicalization and provider-default resolution; equivalent credentials participate in this comparisonINTERNAL: Unexpected server error
Examples:
grpcurl -plaintext \
-H 'x-api-key: <api-key>' \
-d '{
"display_name": "Cohere Rerank v3",
"provider_type": "COHERE",
"endpoint_url": "https://api.cohere.ai",
"model_identifier": "rerank-english-v3.0",
"credentials": "your-cohere-api-key"
}' \
localhost:8080 goodmem.v1.RerankerService/CreateRerankerNote: bytes fields in JSON must be base64.
GetReranker
Retrieves details of a specific reranker configuration.
| Type | |
|---|---|
| Request | goodmem.v1.GetRerankerRequest |
| Response | goodmem.v1.Reranker |
Auth: gRPC metadata x-api-key: <api-key>
Authorization Required: READ_RERANKER on the requested reranker. When
include_credentials is true, the caller must also hold READ_RERANKER_CREDENTIALS; only the
current owner or an instance administrator can supply that authority.
Side Effects: None (read-only operation)
Error Codes:
UNAUTHENTICATED: Missing or invalid authenticationPERMISSION_DENIED: Caller lacksREAD_RERANKER, or requests credentials withoutREAD_RERANKER_CREDENTIALSINVALID_ARGUMENT: Invalidreranker_idformat (not 16-byte UUID)NOT_FOUND: Reranker with specified ID does not existINTERNAL: Unexpected server error
Idempotency: Read-only; safe to retry; results may differ as state changes.
Examples:
grpcurl -plaintext \
-H 'x-api-key: <api-key>' \
-d '{"reranker_id": "base64-encoded-uuid-bytes"}' \
localhost:8080 goodmem.v1.RerankerService/GetRerankerNote: bytes fields in JSON must be base64.
ListRerankers
Lists reranker configurations accessible to the authenticated principal.
| Type | |
|---|---|
| Request | goodmem.v1.ListRerankersRequest |
| Response | goodmem.v1.ListRerankersResponse |
Auth: gRPC metadata x-api-key: <api-key>
Authorization Required: LIST_RERANKER on the GoodMem instance and READ_RERANKER on each
returned reranker. The standard user role may enumerate the catalog and read owned rerankers;
direct grants can expose additional rerankers.
Request Parameters:
owner_id(optional, bytes UUID): Filter the already-authorized result set by ownerprovider_type(optional): Filter by provider type;PROVIDER_TYPE_UNSPECIFIEDignoredlabel_selectors(optional): AND of exact key=value matches (case-sensitive)
Response:
- Returns list of Reranker records accessible to the principal
credentialsfields are always omitted from list responses- Results ordered by
created_atdescending
Side Effects: None (read-only operation)
Error Codes:
UNAUTHENTICATED: Missing or invalid authenticationPERMISSION_DENIED: Caller lacks instance-levelLIST_RERANKERINVALID_ARGUMENT: Invalidowner_idformat (not 16-byte UUID)INTERNAL: Unexpected server error
Idempotency: Read-only; safe to retry; results may change over time.
Examples:
grpcurl -plaintext \
-H 'x-api-key: <api-key>' \
-d '{"provider_type": "COHERE"}' \
localhost:8080 goodmem.v1.RerankerService/ListRerankersNote: bytes fields in JSON must be base64.
UpdateReranker
Updates mutable properties of a reranker configuration.
| Type | |
|---|---|
| Request | goodmem.v1.UpdateRerankerRequest |
| Response | goodmem.v1.Reranker |
Auth: gRPC metadata x-api-key: <api-key>
Authorization Required: UPDATE_RERANKER on the requested reranker.
Summary:
- Only mutable fields can be updated:
display_name,description,endpoint_url,api_path,model_identifier,supported_modalities,credentials,version,monitoring_endpoint, labels - For
supported_modalities, a non-empty list replaces the stored set; omission or an empty list leaves it unchanged and does not count as an update by itself provider_typeandowner_idare immutable- Label updates support replace (clear all, set new) or merge (upsert) strategies
- Omitting
credentialspreserves the stored value; a present empty payload is invalid - The response always omits stored credentials
Side Effects:
- Persists changes; updates
updated_atandupdated_by_id - Performs duplicate detection if
endpoint_url,api_path, ormodel_identifierchanged
Error Codes:
UNAUTHENTICATED: Missing or invalid authenticationPERMISSION_DENIED: Caller lacksUPDATE_RERANKERon the requested rerankerINVALID_ARGUMENT: Invalidreranker_idformat; both label strategies set;provider_typespecified; empty required fieldsNOT_FOUND: Reranker with specified ID does not existALREADY_EXISTS: The resulting effective provider connection and model configuration would duplicate another reranker for the same ownerINTERNAL: Unexpected server error
Idempotency: Idempotent with identical input; safe to retry.
Examples:
grpcurl -plaintext \
-H 'x-api-key: <api-key>' \
-d '{
"reranker_id": "base64-encoded-uuid-bytes",
"display_name": "Updated Reranker Name",
"merge_labels": {"labels": {"environment": "production"}}
}' \
localhost:8080 goodmem.v1.RerankerService/UpdateRerankerNote: bytes fields in JSON must be base64.
DeleteReranker
Permanently deletes a reranker configuration.
| Type | |
|---|---|
| Request | goodmem.v1.DeleteRerankerRequest |
| Response | google.protobuf.Empty |
Auth: gRPC metadata x-api-key: <api-key>
Authorization Required: DELETE_RERANKER on the requested reranker.
Side Effects:
- Permanently removes reranker record from database
- Invalidates any cached references to this reranker
- Does not affect historical usage data or audit logs
Error Codes:
UNAUTHENTICATED: Missing or invalid authenticationPERMISSION_DENIED: Caller lacksDELETE_RERANKERon the requested rerankerINVALID_ARGUMENT: Invalidreranker_idformat (not 16-byte UUID)NOT_FOUND: Reranker with specified ID does not exist or was already deletedINTERNAL: Unexpected server error
Idempotency: Safe to retry; may return NOT_FOUND if already deleted or never existed.
Examples:
grpcurl -plaintext \
-H 'x-api-key: <api-key>' \
-d '{"reranker_id": "base64-encoded-uuid-bytes"}' \
localhost:8080 goodmem.v1.RerankerService/DeleteRerankerNote: bytes fields in JSON must be base64.
Messages
Reranker
Represents a connection to a neural reranking service for post-processing search results.
Rerankers improve search relevance by re-scoring and re-ordering initial retrieval results using sophisticated neural networks or large language models. This includes cross-encoder neural networks, LLM-based reranking services, and other AI-powered relevance models. Algorithmic rerankers (like MMR) are built into the platform and don't require configuration.
Security:
credentialsare returned only byGetRerankerwhen explicitly requested and separately authorized. Create, update, and list responses omit them.
Immutability:
provider_typeis IMMUTABLE after creation.owner_idis set at creation and cannot be modified.
Duplicate detection:
- Uniqueness is enforced per-owner after endpoint canonicalization and provider-default resolution. The effective provider connection, model configuration, and equivalent credentials participate in the comparison.
Notes:
- All timestamps are UTC (
google.protobuf.Timestamp).
See also: goodmem.v1.ProviderType, goodmem.v1.Modality
| Field | Type | Description |
|---|---|---|
reranker_id | bytes | OUTPUT_ONLY UUID (16 bytes); immutable primary identifier |
display_name | string | REQUIRED on create; ≤255 chars after trimming; cannot be empty; user-facing name |
description | string | OPTIONAL descriptive text |
provider_type | goodmem.v1.ProviderType | REQUIRED on create; IMMUTABLE thereafter; service provider type. See: goodmem.v1.ProviderType |
endpoint_url | string | REQUIRED HTTP(S) URL; server canonicalizes (trim, lowercase scheme/host, remove default ports, strip trailing '/' from path; preserve query); used in duplicate detection |
api_path | string | OPTIONAL relative path (no scheme/host; preserve trailing '/' and query); if empty on create, defaults to "/v2/rerank" (Cohere), otherwise "/rerank" |
model_identifier | string | REQUIRED on create; non-empty after trimming; model name or ID |
supported_modalities | goodmem.v1.Modality | OUTPUT semantics: server-stored set; defaults to [TEXT] if omitted at create. See: goodmem.v1.Modality |
credentials | ...dmem.v1.EndpointAuthentication | OPTIONAL structured credentials for upstream authentication; may be empty when provider allows anonymous requests |
labels | ...oodmem.v1.Reranker.LabelsEntry | OPTIONAL; ≤20 entries; keys/values ≤255 chars; keys [a-z0-9._-] case-sensitive; merge overwrites on exact key match |
version | string | OPTIONAL version information |
monitoring_endpoint | string | OPTIONAL HTTP(S) URL for health checks or metrics |
owner_id | bytes | OUTPUT_ONLY owner UUID (16 bytes); set at creation from auth context or request; immutable |
dashscope_api_dialect | goodmem.v1.DashScopeApiDialect | OPTIONAL persisted DashScope API dialect; present only for PROVIDER_TYPE_DASHSCOPE. See: goodmem.v1.DashScopeApiDialect |
created_at | google.protobuf.Timestamp | OUTPUT_ONLY creation timestamp (UTC). See: `google.protobuf.Timestamp` |
updated_at | google.protobuf.Timestamp | OUTPUT_ONLY last modification timestamp (UTC). See: `google.protobuf.Timestamp` |
created_by_id | bytes | OUTPUT_ONLY creator actor UUID (16 bytes); derived from auth context at creation |
updated_by_id | bytes | OUTPUT_ONLY last modifier actor UUID (16 bytes); derived from auth context on update |
Reranker.LabelsEntry
| Field | Type | Description |
|---|---|---|
key | string | |
value | string |
CreateRerankerRequest
Structured request for creating a reranker configuration.
| Field | Type | Description |
|---|---|---|
reranker_id | bytes | Optional: client-provided UUID (16 bytes); server generates if omitted; returns ALREADY_EXISTS if ID exists |
display_name | string | Required: User-facing name (≤255 chars after trimming; cannot be empty) |
description | string | Optional: description of the reranker's purpose |
provider_type | goodmem.v1.ProviderType | Required: Provider type; PROVIDER_TYPE_UNSPECIFIED → INVALID_ARGUMENT. See: goodmem.v1.ProviderType |
endpoint_url | string | Required: HTTP(S) URL; server canonicalizes (trim, lowercase scheme/host, remove default ports, strip trailing '/' from path; preserve query); duplicate detection uses canonical form |
api_path | string | Optional: API path; if empty, defaults to "/v2/rerank" (Cohere), otherwise "/rerank" |
model_identifier | string | Required: Model identifier string (non-empty after trimming) |
supported_modalities | goodmem.v1.Modality | Optional: supported modalities; empty defaults to TEXT only. See: goodmem.v1.Modality |
credentials | ...dmem.v1.EndpointAuthentication | Optional: structured credentials; required only for providers that mandate authentication |
labels | ...ateRerankerRequest.LabelsEntry | Optional: labels (≤20 entries; keys/values ≤255 chars; keys [a-z0-9._-], case-sensitive) |
version | string | Optional: version information for the model/service |
monitoring_endpoint | string | Optional: HTTP(S) URL for health/metrics |
owner_id | bytes | Optional: owner principal UUID (16 bytes); if omitted → authenticated principal; CREATE_RERANKER is evaluated using this proposed owner |
dashscope_api_dialect | goodmem.v1.DashScopeApiDialect | Optional DashScope API dialect; valid only for PROVIDER_TYPE_DASHSCOPE and inferred from explicit api_path, then the advisory model catalog, when omitted. See: goodmem.v1.DashScopeApiDialect |
CreateRerankerRequest.LabelsEntry
| Field | Type | Description |
|---|---|---|
key | string | |
value | string |
GetRerankerRequest
Request for retrieving a specific reranker by ID.
| Field | Type | Description |
|---|---|---|
reranker_id | bytes | Required: Reranker ID (16 bytes UUID) |
include_credentials | bool | Optional: Include stored credentials; requires READ_RERANKER_CREDENTIALS and defaults to false |
ListRerankersRequest
Request for listing rerankers with optional filtering.
| Field | Type | Description |
|---|---|---|
owner_id | bytes | Optional: Filter the already-authorized result set by owner principal UUID (16 bytes) |
provider_type | goodmem.v1.ProviderType | Optional: Filter by provider; PROVIDER_TYPE_UNSPECIFIED ignored. See: goodmem.v1.ProviderType |
label_selectors | ...ersRequest.LabelSelectorsEntry | Optional: Conjunction (AND) of exact key=value matches; case-sensitive |
ListRerankersRequest.LabelSelectorsEntry
| Field | Type | Description |
|---|---|---|
key | string | |
value | string |
ListRerankersResponse
Response containing rerankers accessible to the caller.
| Field | Type | Description |
|---|---|---|
rerankers | goodmem.v1.Reranker | OUTPUT_ONLY list ordered by created_at DESC |
UpdateRerankerRequest
Structured request for updating mutable reranker fields. Omit properties to keep existing values.
| Field | Type | Description |
|---|---|---|
reranker_id | bytes | Required: UUID (16 bytes) of the reranker to update |
display_name | string | Optional: New display name (≤255 chars after trimming); omit to keep existing |
description | string | Optional: Updated description; omit to keep existing |
endpoint_url | string | Optional: Updated HTTP(S) URL; server canonicalizes (trim, lowercase scheme/host, remove default ports, strip trailing '/' from path; preserve query); omit to keep existing |
api_path | string | Optional: Updated API path; omit to keep existing; set blank to reset to provider default |
model_identifier | string | Optional: Updated model identifier (non-empty after trimming); omit to keep existing |
supported_modalities | goodmem.v1.Modality | Optional: If provided with >=1 entries, replaces stored set; omit or empty to leave unchanged and does not count as an update by itself. See: goodmem.v1.Modality |
credentials | ...dmem.v1.EndpointAuthentication | Update credentials; omit to leave unchanged; a present empty payload is invalid and never clears stored credentials |
version | string | Optional: Updated version information; omit to keep existing |
monitoring_endpoint | string | Optional: Updated monitoring endpoint URL; omit to keep existing |
dashscope_api_dialect | goodmem.v1.DashScopeApiDialect | Optional: Updated DashScope API dialect; valid only for PROVIDER_TYPE_DASHSCOPE; omit to preserve the stored value. A recognized canonical api_path selects its matching dialect; an unrecognized custom path preserves the stored dialect. See: goodmem.v1.DashScopeApiDialect |
replace_labels | goodmem.v1.StringMap | Replaces all labels with provided set (empty clears all labels). See: goodmem.v1.StringMap |
merge_labels | goodmem.v1.StringMap | Merges provided entries with existing labels (upsert semantics). See: goodmem.v1.StringMap |
DeleteRerankerRequest
Request for permanently deleting a reranker configuration.
| Field | Type | Description |
|---|---|---|
reranker_id | bytes | Required: Reranker ID (16 bytes UUID) |
Ping
gRPC PingService reference for Ping, PingOnce, with request messages, response types, and service documentation.
Service Identity
gRPC ServiceIdentityService reference for CreateServiceIdentity, GetServiceIdentity, ListServiceIdentities, UpdateServiceIdentity and other RPCs, with request messages, response types, and service documentation.