[ 
https://issues.apache.org/jira/browse/CAMEL-25201?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Luigi De Masi reassigned CAMEL-25201:
-------------------------------------

    Assignee: Luigi De Masi

> camel-typesafe-ai: Make the API path configurable
> -------------------------------------------------
>
>                 Key: CAMEL-25201
>                 URL: https://issues.apache.org/jira/browse/CAMEL-25201
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-ai
>            Reporter: Luigi De Masi
>            Assignee: Luigi De Masi
>            Priority: Major
>
> h2. Problem
> The camel-typesafe-ai component allows configuring baseUrl, but 
> TypeSafeAiClient always appends /v1/systemone. A service or gateway 
> implementing the supported request/response protocol at a different path 
> cannot currently be addressed through configuration alone.
> h2. Proposed improvement
> Introduce an apiPath configuration option, retaining /v1/systemone as the 
> default so existing applications continue to use the same URL.
> Example component configuration:
> {code:properties}
> camel.component.typesafe-ai.base-url=http://localhost:8100
> camel.component.typesafe-ai.api-path=/v1/decision
> {code}
> The resulting request URL should be http://localhost:8100/v1/decision.
> Expose the option at component and endpoint level, following the existing 
> TypeSafeAiConfiguration conventions. The TypeSafe AI adapter used by 
> camel-semantic should inherit the component setting, including when no 
> typesafe-ai endpoint is present in the route.
> h2. Acceptance criteria
> * With apiPath unset, the client continues to append /v1/systemone and 
> preserves existing baseUrl behavior.
> * A configured apiPath is used instead of the hardcoded suffix.
> * URL construction handles the joining slash consistently and preserves any 
> configured baseUrl path prefix.
> * Focused HTTP tests verify the default path, a custom path, 
> component/endpoint configuration, and use through the semantic adapter.
> * Component documentation and generated configuration metadata describe the 
> new option and its default.
> This improvement changes the configurable request path only; the service must 
> still implement the request/response schema supported by camel-typesafe-ai.
> h2. Code references
> * 
> [TypeSafeAiClient.java|https://github.com/apache/camel/blob/main/components/camel-ai/camel-typesafe-ai/src/main/java/org/apache/camel/component/typesafeai/TypeSafeAiClient.java]
> * 
> [TypeSafeAiConfiguration.java|https://github.com/apache/camel/blob/main/components/camel-ai/camel-typesafe-ai/src/main/java/org/apache/camel/component/typesafeai/TypeSafeAiConfiguration.java]
> _AI-generated by Codex on behalf of Luigi De Masi (luigidemasi)._



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to