Repository: envoyproxy/ai-gateway
Pull request #369 (2025-02-18 23:34:13)

api: use consistent naming for cel/extproc
**Commit Message**

This renames some field and constant of API. The first is to rename externalProcess -> externalProcessor where the latter is the official naming in Envoy documentation and API. The second is to rename LLMRequestCost.celExpression -> LLMRequestCost.cel where the short version matches the LLMRequestCostTypeCEL value "CEL" plus the suffix doesn't add any useful context.


mathetake: PTAL @yuzisun 

Patch:
diff --git a/api/v1alpha1/api.go b/api/v1alpha1/api.go
index f5e98d2..9031e7b 100644
--- a/api/v1alpha1/api.go
+++ b/api/v1alpha1/api.go
@@ -95,7 +95,7 @@ type AIGatewayRouteSpec struct {
 	// An AI Gateway filter is responsible for the transformation of the request and response
 	// as well as the routing behavior based on the model name extracted from the request content, etc.
 	//
-	// Currently, the filter is only implemented as an external process filter, which might be
+	// Currently, the filter is only implemented as an external processor filter, which might be
 	// extended to other types of filters in the future. See https://github.com/envoyproxy/ai-gateway/issues/90
 	FilterConfig *AIGatewayFilterConfig `json:"filterConfig,omitempty"`
 
@@ -251,39 +251,39 @@ type AIGatewayRouteRuleMatch struct {
 type AIGatewayFilterConfig struct {
 	// Type specifies the type of the filter configuration.
 	//
-	// Currently, only ExternalProcess is supported, and default is ExternalProcess.
+	// Currently, only ExternalProcessor is supported, and default is ExternalProcessor.
 	//
-	// +kubebuilder:default=ExternalProcess
+	// +kubebuilder:default=ExternalProcessor
 	Type AIGatewayFilterConfigType `json:"type"`
 
-	// ExternalProcess is the configuration for the external process filter.
+	// ExternalProcessor is the configuration for the external processor filter.
 	// This is optional, and if not set, the default values of Deployment spec will be used.
 	//
 	// +optional
-	ExternalProcess *AIGatewayFilterConfigExternalProcess `json:"externalProcess,omitempty"`
+	ExternalProcessor *AIGatewayFilterConfigExternalProcessor `json:"externalProcessor,omitempty"`
 }
 
 // AIGatewayFilterConfigType specifies the type of the filter configuration.
 //
-// +kubebuilder:validation:Enum=ExternalProcess;DynamicModule
+// +kubebuilder:validation:Enum=ExternalProcessor;DynamicModule
 type AIGatewayFilterConfigType string
 
 const (
-	AIGatewayFilterConfigTypeExternalProcess AIGatewayFilterConfigType = "ExternalProcess"
-	AIGatewayFilterConfigTypeDynamicModule   AIGatewayFilterConfigType = "DynamicModule" // Reserved for https://github.com/envoyproxy/ai-gateway/issues/90
+	AIGatewayFilterConfigTypeExternalProcessor AIGatewayFilterConfigType = "ExternalProcessor"
+	AIGatewayFilterConfigTypeDynamicModule     AIGatewayFilterConfigType = "DynamicModule" // Reserved for https://github.com/envoyproxy/ai-gateway/issues/90
 )
 
-type AIGatewayFilterConfigExternalProcess struct {
-	// Replicas is the number of desired pods of the external process deployment.
+type AIGatewayFilterConfigExternalProcessor struct {
+	// Replicas is the number of desired pods of the external processor deployment.
 	//
 	// +optional
 	Replicas *int32 `json:"replicas,omitempty"`
-	// Resources required by the external process container.
+	// Resources required by the external processor container.
 	// More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
 	//
 	// +optional
 	Resources *corev1.ResourceRequirements `json:"resources,omitempty"`
-	// TODO: maybe adding the option not to deploy the external process filter and let the user deploy it manually?
+	// TODO: maybe adding the option not to deploy the external processor filter and let the user deploy it manually?
 	// 	Not sure if it is worth it as we are migrating to dynamic modules.
 }
 
@@ -509,7 +509,7 @@ type LLMRequestCost struct {
 	//
 	// +kubebuilder:validation:Enum=OutputToken;InputToken;TotalToken;CEL
 	Type LLMRequestCostType `json:"type"`
-	// CELExpression is the CEL expression to calculate the cost of the request.
+	// CEL is the CEL expression to calculate the cost of the request.
 	// The CEL expression must return a signed or unsigned integer. If the
 	// return value is negative, it will be error.
 	//
@@ -529,7 +529,7 @@ type LLMRequestCost struct {
 	//	* "input_tokens * output_tokens"
 	//
 	// +optional
-	CELExpression *string `json:"celExpression,omitempty"`
+	CEL *string `json:"cel,omitempty"`
 }
 
 // LLMRequestCostType specifies the type of the LLMRequestCost.
diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go
index 5d6c858..5ca338e 100644
--- a/api/v1alpha1/zz_generated.deepcopy.go
+++ b/api/v1alpha1/zz_generated.deepcopy.go
@@ -19,9 +19,9 @@ import (
 // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 func (in *AIGatewayFilterConfig) DeepCopyInto(out *AIGatewayFilterConfig) {
 	*out = *in
-	if in.ExternalProcess != nil {
-		in, out := &in.ExternalProcess, &out.ExternalProcess
-		*out = new(AIGatewayFilterConfigExternalProcess)
+	if in.ExternalProcessor != nil {
+		in, out := &in.ExternalProcessor, &out.ExternalProcessor
+		*out = new(AIGatewayFilterConfigExternalProcessor)
 		(*in).DeepCopyInto(*out)
 	}
 }
@@ -37,7 +37,7 @@ func (in *AIGatewayFilterConfig) DeepCopy() *AIGatewayFilterConfig {
 }
 
 // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *AIGatewayFilterConfigExternalProcess) DeepCopyInto(out *AIGatewayFilterConfigExternalProcess) {
+func (in *AIGatewayFilterConfigExternalProcessor) DeepCopyInto(out *AIGatewayFilterConfigExternalProcessor) {
 	*out = *in
 	if in.Replicas != nil {
 		in, out := &in.Replicas, &out.Replicas
@@ -51,12 +51,12 @@ func (in *AIGatewayFilterConfigExternalProcess) DeepCopyInto(out *AIGatewayFilte
 	}
 }
 
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIGatewayFilterConfigExternalProcess.
-func (in *AIGatewayFilterConfigExternalProcess) DeepCopy() *AIGatewayFilterConfigExternalProcess {
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIGatewayFilterConfigExternalProcessor.
+func (in *AIGatewayFilterConfigExternalProcessor) DeepCopy() *AIGatewayFilterConfigExternalProcessor {
 	if in == nil {
 		return nil
 	}
-	out := new(AIGatewayFilterConfigExternalProcess)
+	out := new(AIGatewayFilterConfigExternalProcessor)
 	in.DeepCopyInto(out)
 	return out
 }
@@ -472,8 +472,8 @@ func (in *BackendSecurityPolicySpec) DeepCopy() *BackendSecurityPolicySpec {
 // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 func (in *LLMRequestCost) DeepCopyInto(out *LLMRequestCost) {
 	*out = *in
-	if in.CELExpression != nil {
-		in, out := &in.CELExpression, &out.CELExpression
+	if in.CEL != nil {
+		in, out := &in.CEL, &out.CEL
 		*out = new(string)
 		**out = **in
 	}
diff --git a/docs/proposals/001-ai-gateway-proposal/proposal.md b/docs/proposals/001-ai-gateway-proposal/proposal.md
index 7efcf48..23ed0a7 100644
--- a/docs/proposals/001-ai-gateway-proposal/proposal.md
+++ b/docs/proposals/001-ai-gateway-proposal/proposal.md
@@ -124,7 +124,7 @@ Rules []AIGatewayRouteRule `json:"rules"`
 // An AI Gateway filter is responsible for the transformation of the request and response
 // as well as the routing behavior based on the model name extracted from the request content, etc.
 //
-// Currently, the filter is only implemented as an external process filter, which might be
+// Currently, the filter is only implemented as an external processor filter, which might be
 // extended to other types of filters in the future. See https://github.com/envoyproxy/ai-gateway/issues/90
 FilterConfig *AIGatewayFilterConfig `json:"filterConfig,omitempty"`
 
@@ -184,9 +184,9 @@ type LLMRequestCost struct {
 MetadataKey string `json:"metadataKey"`
 // Type is the kind of the request cost calculation.
 Type LLMRequestCostType `json:"type"`
-// CELExpression is the CEL expression to calculate the cost of the request.
-// This is not empty when the Type is LLMRequestCostTypeCELExpression.
-CELExpression string `json:"celExpression,omitempty"`
+// CEL is the CEL expression to calculate the cost of the request.
+// This is not empty when the Type is LLMRequestCostTypeCEL.
+CEL string `json:"cel,omitempty"`
 }
 ```
 
diff --git a/examples/extproc_custom_router/README.md b/examples/extproc_custom_router/README.md
index 01701a1..5a3ce28 100644
--- a/examples/extproc_custom_router/README.md
+++ b/examples/extproc_custom_router/README.md
@@ -1,1 +1,1 @@
-This example shows how to insert a custom router in the custom external process using `filterapi` package.
+This example shows how to insert a custom router in the custom external processor using `filterapi` package.
diff --git a/examples/token_ratelimit/token_ratelimit.yaml b/examples/token_ratelimit/token_ratelimit.yaml
index 79d0eda..d3c6a20 100644
--- a/examples/token_ratelimit/token_ratelimit.yaml
+++ b/examples/token_ratelimit/token_ratelimit.yaml
@@ -55,7 +55,7 @@ spec:
     # otherwise it returns 0 (no token usage).
     - metadataKey: llm_cel_calculated_token
       type: CEL
-      celExpression: "input_tokens == uint(3) ? 100000000 : 0"
+      cel: "input_tokens == uint(3) ? 100000000 : 0"
 ---
 apiVersion: aigateway.envoyproxy.io/v1alpha1
 kind: AIServiceBackend
diff --git a/filterapi/filterconfig.go b/filterapi/filterconfig.go
index a826291..f4e64d7 100644
--- a/filterapi/filterconfig.go
+++ b/filterapi/filterconfig.go
@@ -102,9 +102,9 @@ type LLMRequestCost struct {
 	MetadataKey string `json:"metadataKey"`
 	// Type is the kind of the request cost calculation.
 	Type LLMRequestCostType `json:"type"`
-	// CELExpression is the CEL expression to calculate the cost of the request.
-	// This is not empty when the Type is LLMRequestCostTypeCELExpression.
-	CELExpression string `json:"celExpression,omitempty"`
+	// CEL is the CEL expression to calculate the cost of the request.
+	// This is not empty when the Type is LLMRequestCostTypeCEL.
+	CEL string `json:"cel,omitempty"`
 }
 
 // LLMRequestCostType specifies the kind of the request cost calculation.
@@ -117,8 +117,8 @@ const (
 	LLMRequestCostTypeInputToken LLMRequestCostType = "InputToken"
 	// LLMRequestCostTypeTotalToken specifies that the request cost is calculated from the total token.
 	LLMRequestCostTypeTotalToken LLMRequestCostType = "TotalToken"
-	// LLMRequestCostTypeCELExpression specifies that the request cost is calculated from the CEL expression.
-	LLMRequestCostTypeCELExpression LLMRequestCostType = "CEL"
+	// LLMRequestCostTypeCEL specifies that the request cost is calculated from the CEL expression.
+	LLMRequestCostTypeCEL LLMRequestCostType = "CEL"
 )
 
 // VersionedAPISchema corresponds to VersionedAPISchema in api/v1alpha1/api.go.
diff --git a/internal/controller/ai_gateway_route.go b/internal/controller/ai_gateway_route.go
index 9e1a03c..26b3b78 100644
--- a/internal/controller/ai_gateway_route.go
+++ b/internal/controller/ai_gateway_route.go
@@ -154,7 +154,7 @@ func (c *AIGatewayRouteController) reconcileExtProcExtensionPolicy(ctx context.C
 }
 
 // ensuresExtProcConfigMapExists ensures that a configmap exists for the external process.
-// This must happen before the external process deployment is created.
+// This must happen before the external processor deployment is created.
 func (c *AIGatewayRouteController) ensuresExtProcConfigMapExists(ctx context.Context, aiGatewayRoute *aigv1a1.AIGatewayRoute) (err error) {
 	name := extProcName(aiGatewayRoute)
 	// Check if a configmap exists for extproc exists, and if not, create one with the default config.
@@ -180,10 +180,10 @@ func extProcName(route *aigv1a1.AIGatewayRoute) string {
 }
 
 func applyExtProcDeploymentConfigUpdate(d *appsv1.DeploymentSpec, filterConfig *aigv1a1.AIGatewayFilterConfig) {
-	if filterConfig == nil || filterConfig.ExternalProcess == nil {
+	if filterConfig == nil || filterConfig.ExternalProcessor == nil {
 		return
 	}
-	extProc := filterConfig.ExternalProcess
+	extProc := filterConfig.ExternalProcessor
 	if resource := extProc.Resources; resource != nil {
 		d.Template.Spec.Containers[0].Resources = *resource
 	}
@@ -277,7 +277,7 @@ func (c *AIGatewayRouteController) syncAIGatewayRoute(ctx context.Context, aiGat
 	return nil
 }
 
-// updateExtProcConfigMap updates the external process configmap with the new AIGatewayRoute.
+// updateExtProcConfigMap updates the external processor configmap with the new AIGatewayRoute.
 func (c *AIGatewayRouteController) updateExtProcConfigMap(ctx context.Context, aiGatewayRoute *aigv1a1.AIGatewayRoute, uuid string) error {
 	configMap, err := c.kube.CoreV1().ConfigMaps(aiGatewayRoute.Namespace).Get(ctx, extProcName(aiGatewayRoute), metav1.GetOptions{})
 	if err != nil {
@@ -360,14 +360,14 @@ func (c *AIGatewayRouteController) updateExtProcConfigMap(ctx context.Context, a
 		case aigv1a1.LLMRequestCostTypeTotalToken:
 			fc.Type = filterapi.LLMRequestCostTypeTotalToken
 		case aigv1a1.LLMRequestCostTypeCEL:
-			fc.Type = filterapi.LLMRequestCostTypeCELExpression
-			expr := *cost.CELExpression
+			fc.Type = filterapi.LLMRequestCostTypeCEL
+			expr := *cost.CEL
 			// Sanity check the CEL expression.
 			_, err = llmcostcel.NewProgram(expr)
 			if err != nil {
 				return fmt.Errorf("invalid CEL expression: %w", err)
 			}
-			fc.CELExpression = expr
+			fc.CEL = expr
 		default:
 			return fmt.Errorf("unknown request cost type: %s", cost.Type)
 		}
diff --git a/internal/extproc/chatcompletion_processor.go b/internal/extproc/chatcompletion_processor.go
index 21717a9..56f0911 100644
--- a/internal/extproc/chatcompletion_processor.go
+++ b/internal/extproc/chatcompletion_processor.go
@@ -219,7 +219,7 @@ func (c *chatCompletionProcessor) maybeBuildDynamicMetadata() (*structpb.Struct,
 			cost = c.costs.OutputTokens
 		case filterapi.LLMRequestCostTypeTotalToken:
 			cost = c.costs.TotalTokens
-		case filterapi.LLMRequestCostTypeCELExpression:
+		case filterapi.LLMRequestCostTypeCEL:
 			costU64, err := llmcostcel.EvaluateProgram(
 				rc.celProg,
 				c.requestHeaders[c.config.modelNameHeaderKey],
diff --git a/internal/extproc/server.go b/internal/extproc/server.go
index bd53ae7..444535a 100644
--- a/internal/extproc/server.go
+++ b/internal/extproc/server.go
@@ -36,7 +36,7 @@ const (
 
 var sensitiveHeaderKeys = []string{"authorization"}
 
-// Server implements the external process server.
+// Server implements the external processor server.
 type Server struct {
 	logger     *slog.Logger
 	config     *processorConfig
@@ -90,8 +90,8 @@ func (s *Server) LoadConfig(ctx context.Context, config *filterapi.Config) error
 	for i := range config.LLMRequestCosts {
 		c := &config.LLMRequestCosts[i]
 		var prog cel.Program
-		if c.CELExpression != "" {
-			prog, err = llmcostcel.NewProgram(c.CELExpression)
+		if c.CEL != "" {
+			prog, err = llmcostcel.NewProgram(c.CEL)
 			if err != nil {
 				return fmt.Errorf("cannot create CEL program for cost: %w", err)
 			}
diff --git a/manifests/charts/ai-gateway-helm/crds/aigateway.envoyproxy.io_aigatewayroutes.yaml b/manifests/charts/ai-gateway-helm/crds/aigateway.envoyproxy.io_aigatewayroutes.yaml
index bb40b33..752a324 100644
--- a/manifests/charts/ai-gateway-helm/crds/aigateway.envoyproxy.io_aigatewayroutes.yaml
+++ b/manifests/charts/ai-gateway-helm/crds/aigateway.envoyproxy.io_aigatewayroutes.yaml
@@ -76,22 +76,22 @@ spec:
                   An AI Gateway filter is responsible for the transformation of the request and response
                   as well as the routing behavior based on the model name extracted from the request content, etc.
 
-                  Currently, the filter is only implemented as an external process filter, which might be
+                  Currently, the filter is only implemented as an external processor filter, which might be
                   extended to other types of filters in the future. See https://github.com/envoyproxy/ai-gateway/issues/90
                 properties:
-                  externalProcess:
+                  externalProcessor:
                     description: |-
-                      ExternalProcess is the configuration for the external process filter.
+                      ExternalProcessor is the configuration for the external processor filter.
                       This is optional, and if not set, the default values of Deployment spec will be used.
                     properties:
                       replicas:
                         description: Replicas is the number of desired pods of the
-                          external process deployment.
+                          external processor deployment.
                         format: int32
                         type: integer
                       resources:
                         description: |-
-                          Resources required by the external process container.
+                          Resources required by the external processor container.
                           More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
                         properties:
                           claims:
@@ -152,13 +152,13 @@ spec:
                         type: object
                     type: object
                   type:
-                    default: ExternalProcess
+                    default: ExternalProcessor
                     description: |-
                       Type specifies the type of the filter configuration.
 
-                      Currently, only ExternalProcess is supported, and default is ExternalProcess.
+                      Currently, only ExternalProcessor is supported, and default is ExternalProcessor.
                     enum:
-                    - ExternalProcess
+                    - ExternalProcessor
                     - DynamicModule
                     type: string
                 required:
@@ -213,15 +213,15 @@ spec:
                 items:
                   description: LLMRequestCost configures each request cost.
                   properties:
-                    celExpression:
-                      description: "CELExpression is the CEL expression to calculate
-                        the cost of the request.\nThe CEL expression must return a
-                        signed or unsigned integer. If the\nreturn value is negative,
-                        it will be error.\n\nThe expression can use the following
-                        variables:\n\n\t* model: the model name extracted from the
-                        request content. Type: string.\n\t* backend: the backend name
-                        in the form of \"name.namespace\". Type: string.\n\t* input_tokens:
-                        the number of input tokens. Type: unsigned integer.\n\t* output_tokens:
+                    cel:
+                      description: "CEL is the CEL expression to calculate the cost
+                        of the request.\nThe CEL expression must return a signed or
+                        unsigned integer. If the\nreturn value is negative, it will
+                        be error.\n\nThe expression can use the following variables:\n\n\t*
+                        model: the model name extracted from the request content.
+                        Type: string.\n\t* backend: the backend name in the form of
+                        \"name.namespace\". Type: string.\n\t* input_tokens: the number
+                        of input tokens. Type: unsigned integer.\n\t* output_tokens:
                         the number of output tokens. Type: unsigned integer.\n\t*
                         total_tokens: the total number of tokens. Type: unsigned integer.\n\nFor
                         example, the following expressions are valid:\n\n\t* \"model
diff --git a/site/docs/api/api.mdx b/site/docs/api/api.mdx
index 9182528..ab9c8f8 100644
--- a/site/docs/api/api.mdx
+++ b/site/docs/api/api.mdx
@@ -281,7 +281,7 @@ BackendSecurityPolicyList contains a list of BackendSecurityPolicy
 
 ### Available Types
 - [AIGatewayFilterConfig](#aigatewayfilterconfig)
-- [AIGatewayFilterConfigExternalProcess](#aigatewayfilterconfigexternalprocess)
+- [AIGatewayFilterConfigExternalProcessor](#aigatewayfilterconfigexternalprocessor)
 - [AIGatewayFilterConfigType](#aigatewayfilterconfigtype)
 - [AIGatewayRouteRule](#aigatewayrouterule)
 - [AIGatewayRouteRuleBackendRef](#aigatewayrouterulebackendref)
@@ -317,17 +317,17 @@ BackendSecurityPolicyList contains a list of BackendSecurityPolicy
   name="type"
   type="[AIGatewayFilterConfigType](#aigatewayfilterconfigtype)"
   required="true"
-  defaultValue="ExternalProcess"
-  description="Type specifies the type of the filter configuration.<br />Currently, only ExternalProcess is supported, and default is ExternalProcess."
+  defaultValue="ExternalProcessor"
+  description="Type specifies the type of the filter configuration.<br />Currently, only ExternalProcessor is supported, and default is ExternalProcessor."
 /><ApiField
-  name="externalProcess"
-  type="[AIGatewayFilterConfigExternalProcess](#aigatewayfilterconfigexternalprocess)"
+  name="externalProcessor"
+  type="[AIGatewayFilterConfigExternalProcessor](#aigatewayfilterconfigexternalprocessor)"
   required="false"
-  description="ExternalProcess is the configuration for the external process filter.<br />This is optional, and if not set, the default values of Deployment spec will be used."
+  description="ExternalProcessor is the configuration for the external processor filter.<br />This is optional, and if not set, the default values of Deployment spec will be used."
 />
 
 
-#### AIGatewayFilterConfigExternalProcess
+#### AIGatewayFilterConfigExternalProcessor
 
 
 
@@ -344,12 +344,12 @@ BackendSecurityPolicyList contains a list of BackendSecurityPolicy
   name="replicas"
   type="integer"
   required="false"
-  description="Replicas is the number of desired pods of the external process deployment."
+  description="Replicas is the number of desired pods of the external processor deployment."
 /><ApiField
   name="resources"
   type="[ResourceRequirements](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#resourcerequirements-v1-core)"
   required="false"
-  description="Resources required by the external process container.<br />More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/"
+  description="Resources required by the external processor container.<br />More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/"
 />
 
 
@@ -367,7 +367,7 @@ AIGatewayFilterConfigType specifies the type of the filter configuration.
 ##### Possible Values
 
 <ApiField
-  name="ExternalProcess"
+  name="ExternalProcessor"
   type="enum"
   required="false"
   description=""
@@ -483,7 +483,7 @@ AIGatewayRouteSpec details the AIGatewayRoute configuration.
   name="filterConfig"
   type="[AIGatewayFilterConfig](#aigatewayfilterconfig)"
   required="true"
-  description="FilterConfig is the configuration for the AI Gateway filter inserted in the generated HTTPRoute.<br />An AI Gateway filter is responsible for the transformation of the request and response<br />as well as the routing behavior based on the model name extracted from the request content, etc.<br />Currently, the filter is only implemented as an external process filter, which might be<br />extended to other types of filters in the future. See https://github.com/envoyproxy/ai-gateway/issues/90"
+  description="FilterConfig is the configuration for the AI Gateway filter inserted in the generated HTTPRoute.<br />An AI Gateway filter is responsible for the transformation of the request and response<br />as well as the routing behavior based on the model name extracted from the request content, etc.<br />Currently, the filter is only implemented as an external processor filter, which might be<br />extended to other types of filters in the future. See https://github.com/envoyproxy/ai-gateway/issues/90"
 /><ApiField
   name="llmRequestCosts"
   type="[LLMRequestCost](#llmrequestcost) array"
@@ -747,10 +747,10 @@ LLMRequestCost configures each request cost.
   required="true"
   description="Type specifies the type of the request cost. The default is `OutputToken`,<br />and it uses `output token` as the cost. The other types are `InputToken`, `TotalToken`,<br />and `CEL`."
 /><ApiField
-  name="celExpression"
+  name="cel"
   type="string"
   required="false"
-  description="CELExpression is the CEL expression to calculate the cost of the request.<br />The CEL expression must return a signed or unsigned integer. If the<br />return value is negative, it will be error.<br />The expression can use the following variables:<br />	* model: the model name extracted from the request content. Type: string.<br />	* backend: the backend name in the form of `name.namespace`. Type: string.<br />	* input_tokens: the number of input tokens. Type: unsigned integer.<br />	* output_tokens: the number of output tokens. Type: unsigned integer.<br />	* total_tokens: the total number of tokens. Type: unsigned integer.<br />For example, the following expressions are valid:<br />	* `model == 'llama' ?  input_tokens + output_token * 0.5 : total_tokens`<br />	* `backend == 'foo.default' ?  input_tokens + output_tokens : total_tokens`<br />	* `input_tokens + output_tokens + total_tokens`<br />	* `input_tokens * output_tokens`"
+  description="CEL is the CEL expression to calculate the cost of the request.<br />The CEL expression must return a signed or unsigned integer. If the<br />return value is negative, it will be error.<br />The expression can use the following variables:<br />	* model: the model name extracted from the request content. Type: string.<br />	* backend: the backend name in the form of `name.namespace`. Type: string.<br />	* input_tokens: the number of input tokens. Type: unsigned integer.<br />	* output_tokens: the number of output tokens. Type: unsigned integer.<br />	* total_tokens: the total number of tokens. Type: unsigned integer.<br />For example, the following expressions are valid:<br />	* `model == 'llama' ?  input_tokens + output_token * 0.5 : total_tokens`<br />	* `backend == 'foo.default' ?  input_tokens + output_tokens : total_tokens`<br />	* `input_tokens + output_tokens + total_tokens`<br />	* `input_tokens * output_tokens`"
 />
 
 
diff --git a/site/docs/capabilities/usage-based-ratelimiting.md b/site/docs/capabilities/usage-based-ratelimiting.md
index c286306..c1e7a5b 100644
--- a/site/docs/capabilities/usage-based-ratelimiting.md
+++ b/site/docs/capabilities/usage-based-ratelimiting.md
@@ -67,7 +67,7 @@ spec:
   llmRequestCosts:
     - metadataKey: custom_cost
       type: CEL
-      celExpression: "input_tokens * 0.5 + output_tokens * 1.5"  # Example: Weight output tokens more heavily
+      cel: "input_tokens * 0.5 + output_tokens * 1.5"  # Example: Weight output tokens more heavily
 ```
 
 ### 2. Configure Rate Limits
diff --git a/site/docs/getting-started/connect-providers/openai.md b/site/docs/getting-started/connect-providers/openai.md
index ce04fed..65cc9c9 100644
--- a/site/docs/getting-started/connect-providers/openai.md
+++ b/site/docs/getting-started/connect-providers/openai.md
@@ -86,7 +86,7 @@ If you encounter issues:
    kubectl logs -n envoy-ai-gateway-system deployment/ai-gateway-controller
    ```
 
-4. View External Process Logs
+4. View External Processor Logs
 
    ```shell
    kubectl logs services/ai-eg-route-extproc-envoy-ai-gateway-basic


Test patch:
diff --git a/internal/controller/ai_gateway_route_test.go b/internal/controller/ai_gateway_route_test.go
index c778cae..43d9443 100644
--- a/internal/controller/ai_gateway_route_test.go
+++ b/internal/controller/ai_gateway_route_test.go
@@ -173,7 +173,7 @@ func Test_applyExtProcDeploymentConfigUpdate(t *testing.T) {
 		applyExtProcDeploymentConfigUpdate(dep, nil)
 		applyExtProcDeploymentConfigUpdate(dep, &aigv1a1.AIGatewayFilterConfig{})
 		applyExtProcDeploymentConfigUpdate(dep, &aigv1a1.AIGatewayFilterConfig{
-			ExternalProcess: &aigv1a1.AIGatewayFilterConfigExternalProcess{},
+			ExternalProcessor: &aigv1a1.AIGatewayFilterConfigExternalProcessor{},
 		})
 	})
 	t.Run("update", func(t *testing.T) {
@@ -184,7 +184,7 @@ func Test_applyExtProcDeploymentConfigUpdate(t *testing.T) {
 			},
 		}
 		applyExtProcDeploymentConfigUpdate(dep, &aigv1a1.AIGatewayFilterConfig{
-			ExternalProcess: &aigv1a1.AIGatewayFilterConfigExternalProcess{
+			ExternalProcessor: &aigv1a1.AIGatewayFilterConfigExternalProcessor{
 				Resources: &req,
 				Replicas:  ptr.To[int32](123),
 			},
@@ -535,9 +535,9 @@ func TestAIGatewayRouteController_updateExtProcConfigMap(t *testing.T) {
 							MetadataKey: "total-token",
 						},
 						{
-							Type:          aigv1a1.LLMRequestCostTypeCEL,
-							MetadataKey:   "cel-token",
-							CELExpression: ptr.To("model == 'cool_model' ?  input_tokens * output_tokens : total_tokens"),
+							Type:        aigv1a1.LLMRequestCostTypeCEL,
+							MetadataKey: "cel-token",
+							CEL:         ptr.To("model == 'cool_model' ?  input_tokens * output_tokens : total_tokens"),
 						},
 					},
 				},
@@ -590,7 +590,7 @@ func TestAIGatewayRouteController_updateExtProcConfigMap(t *testing.T) {
 					{Type: filterapi.LLMRequestCostTypeOutputToken, MetadataKey: "output-token"},
 					{Type: filterapi.LLMRequestCostTypeInputToken, MetadataKey: "input-token"},
 					{Type: filterapi.LLMRequestCostTypeTotalToken, MetadataKey: "total-token"},
-					{Type: filterapi.LLMRequestCostTypeCELExpression, MetadataKey: "cel-token", CELExpression: "model == 'cool_model' ?  input_tokens * output_tokens : total_tokens"},
+					{Type: filterapi.LLMRequestCostTypeCEL, MetadataKey: "cel-token", CEL: "model == 'cool_model' ?  input_tokens * output_tokens : total_tokens"},
 				},
 			},
 		},
@@ -675,8 +675,8 @@ func TestAIGatewayRouteController_syncExtProcDeployment(t *testing.T) {
 		},
 		Spec: aigv1a1.AIGatewayRouteSpec{
 			FilterConfig: &aigv1a1.AIGatewayFilterConfig{
-				Type: aigv1a1.AIGatewayFilterConfigTypeExternalProcess,
-				ExternalProcess: &aigv1a1.AIGatewayFilterConfigExternalProcess{
+				Type: aigv1a1.AIGatewayFilterConfigTypeExternalProcessor,
+				ExternalProcessor: &aigv1a1.AIGatewayFilterConfigExternalProcessor{
 					Replicas: ptr.To[int32](123),
 					Resources: &corev1.ResourceRequirements{
 						Limits: corev1.ResourceList{
@@ -755,8 +755,8 @@ func TestAIGatewayRouteController_syncExtProcDeployment(t *testing.T) {
 				corev1.ResourceMemory: resource.MustParse("32Mi"),
 			},
 		}
-		aiGatewayRoute.Spec.FilterConfig.ExternalProcess.Resources = newResourceLimits
-		aiGatewayRoute.Spec.FilterConfig.ExternalProcess.Replicas = ptr.To[int32](456)
+		aiGatewayRoute.Spec.FilterConfig.ExternalProcessor.Resources = newResourceLimits
+		aiGatewayRoute.Spec.FilterConfig.ExternalProcessor.Replicas = ptr.To[int32](456)
 
 		require.NoError(t, s.syncExtProcDeployment(t.Context(), aiGatewayRoute))
 		// Check the deployment is updated.
diff --git a/internal/extproc/chatcompletion_processor_test.go b/internal/extproc/chatcompletion_processor_test.go
index 2843e21..649877a 100644
--- a/internal/extproc/chatcompletion_processor_test.go
+++ b/internal/extproc/chatcompletion_processor_test.go
@@ -114,11 +114,11 @@ func TestChatCompletion_ProcessResponseBody(t *testing.T) {
 				{LLMRequestCost: &filterapi.LLMRequestCost{Type: filterapi.LLMRequestCostTypeInputToken, MetadataKey: "input_token_usage"}},
 				{
 					celProg:        celProgInt,
-					LLMRequestCost: &filterapi.LLMRequestCost{Type: filterapi.LLMRequestCostTypeCELExpression, MetadataKey: "cel_int"},
+					LLMRequestCost: &filterapi.LLMRequestCost{Type: filterapi.LLMRequestCostTypeCEL, MetadataKey: "cel_int"},
 				},
 				{
 					celProg:        celProgUint,
-					LLMRequestCost: &filterapi.LLMRequestCost{Type: filterapi.LLMRequestCostTypeCELExpression, MetadataKey: "cel_uint"},
+					LLMRequestCost: &filterapi.LLMRequestCost{Type: filterapi.LLMRequestCostTypeCEL, MetadataKey: "cel_uint"},
 				},
 			},
 		}}
diff --git a/internal/extproc/server_test.go b/internal/extproc/server_test.go
index 9b67109..55d6aa2 100644
--- a/internal/extproc/server_test.go
+++ b/internal/extproc/server_test.go
@@ -42,7 +42,7 @@ func TestServer_LoadConfig(t *testing.T) {
 			MetadataNamespace: "ns",
 			LLMRequestCosts: []filterapi.LLMRequestCost{
 				{MetadataKey: "key", Type: filterapi.LLMRequestCostTypeOutputToken},
-				{MetadataKey: "cel_key", Type: filterapi.LLMRequestCostTypeCELExpression, CELExpression: "1 + 1"},
+				{MetadataKey: "cel_key", Type: filterapi.LLMRequestCostTypeCEL, CEL: "1 + 1"},
 			},
 			Schema:                   filterapi.VersionedAPISchema{Name: filterapi.APISchemaOpenAI},
 			SelectedBackendHeaderKey: "x-ai-eg-selected-backend",
@@ -87,8 +87,8 @@ func TestServer_LoadConfig(t *testing.T) {
 		require.Len(t, s.config.requestCosts, 2)
 		require.Equal(t, filterapi.LLMRequestCostTypeOutputToken, s.config.requestCosts[0].Type)
 		require.Equal(t, "key", s.config.requestCosts[0].MetadataKey)
-		require.Equal(t, filterapi.LLMRequestCostTypeCELExpression, s.config.requestCosts[1].Type)
-		require.Equal(t, "1 + 1", s.config.requestCosts[1].CELExpression)
+		require.Equal(t, filterapi.LLMRequestCostTypeCEL, s.config.requestCosts[1].Type)
+		require.Equal(t, "1 + 1", s.config.requestCosts[1].CEL)
 		prog := s.config.requestCosts[1].celProg
 		require.NotNil(t, prog)
 		val, err := llmcostcel.EvaluateProgram(prog, "", "", 1, 1, 1)
diff --git a/tests/controller/controller_test.go b/tests/controller/controller_test.go
index 1b37070..98efdc3 100644
--- a/tests/controller/controller_test.go
+++ b/tests/controller/controller_test.go
@@ -110,8 +110,8 @@ func TestStartControllers(t *testing.T) {
 						},
 					},
 					FilterConfig: &aigv1a1.AIGatewayFilterConfig{
-						Type: aigv1a1.AIGatewayFilterConfigTypeExternalProcess,
-						ExternalProcess: &aigv1a1.AIGatewayFilterConfigExternalProcess{
+						Type: aigv1a1.AIGatewayFilterConfigTypeExternalProcessor,
+						ExternalProcessor: &aigv1a1.AIGatewayFilterConfigExternalProcessor{
 							Replicas: ptr.To[int32](5), Resources: resourceReq,
 						},
 					},
@@ -376,8 +376,8 @@ func TestAIGatewayRouteController(t *testing.T) {
 				},
 			},
 			FilterConfig: &aigv1a1.AIGatewayFilterConfig{
-				Type: aigv1a1.AIGatewayFilterConfigTypeExternalProcess,
-				ExternalProcess: &aigv1a1.AIGatewayFilterConfigExternalProcess{
+				Type: aigv1a1.AIGatewayFilterConfigTypeExternalProcessor,
+				ExternalProcessor: &aigv1a1.AIGatewayFilterConfigExternalProcessor{
 					Replicas: ptr.To[int32](5), Resources: resourceReq,
 				},
 			},
@@ -462,8 +462,8 @@ func TestAIGatewayRouteController(t *testing.T) {
 				corev1.ResourceMemory: resource.MustParse("32Mi"),
 			},
 		}
-		origin.Spec.FilterConfig.ExternalProcess.Replicas = ptr.To[int32](3)
-		origin.Spec.FilterConfig.ExternalProcess.Resources = newResource
+		origin.Spec.FilterConfig.ExternalProcessor.Replicas = ptr.To[int32](3)
+		origin.Spec.FilterConfig.ExternalProcessor.Resources = newResource
 		err := c.Update(t.Context(), origin)
 		require.NoError(t, err)
 
diff --git a/tests/crdcel/testdata/aigatewayroutes/llmcosts.yaml b/tests/crdcel/testdata/aigatewayroutes/llmcosts.yaml
index 8fadbb0..9175b8d 100644
--- a/tests/crdcel/testdata/aigatewayroutes/llmcosts.yaml
+++ b/tests/crdcel/testdata/aigatewayroutes/llmcosts.yaml
@@ -35,4 +35,4 @@ spec:
       type: TotalToken
     - metadataKey: some_cel_cost
       type: CEL
-      celExpression: "llm_input_token + llm_output_token + llm_total_token"
+      cel: "llm_input_token + llm_output_token + llm_total_token"
diff --git a/tests/extproc/real_providers_test.go b/tests/extproc/real_providers_test.go
index 32eae0c..a217043 100644
--- a/tests/extproc/real_providers_test.go
+++ b/tests/extproc/real_providers_test.go
@@ -38,7 +38,7 @@ func TestWithRealProviders(t *testing.T) {
 		MetadataNamespace: "ai_gateway_llm_ns",
 		LLMRequestCosts: []filterapi.LLMRequestCost{
 			{MetadataKey: "used_token", Type: filterapi.LLMRequestCostTypeInputToken},
-			{MetadataKey: "some_cel", Type: filterapi.LLMRequestCostTypeCELExpression, CELExpression: "1+1"},
+			{MetadataKey: "some_cel", Type: filterapi.LLMRequestCostTypeCEL, CEL: "1+1"},
 		},
 		Schema: openAISchema,
 		// This can be any header key, but it must match the envoy.yaml routing configuration.
diff --git a/tests/internal/testupstreamlib/testupstream/main.go b/tests/internal/testupstreamlib/testupstream/main.go
index d91538d..1eb2972 100644
--- a/tests/internal/testupstreamlib/testupstream/main.go
+++ b/tests/internal/testupstreamlib/testupstream/main.go
@@ -32,7 +32,7 @@ var logger = log.New(os.Stdout, "[testupstream] ", 0)
 // This also checks if the request content matches the expected headers, path, and body specified in
 // expectedHeadersKey, expectedPathHeaderKey, and expectedRequestBodyHeaderKey.
 //
-// This is useful to test the external process request to the Envoy Gateway LLM Controller.
+// This is useful to test the external processor request to the Envoy Gateway LLM Controller.
 func main() {
 	logger.Println("Version: ", version.Version)
 	l, err := net.Listen("tcp", ":8080") // nolint: gosec