Skip to content

[BUG] Not expected result in request with tool_result #2746

Description

@aljesusg

Bug Description

Wrong answers with Gemini 2.5 through OpenAI

Output of OLS version

1.0.9

Describe the bug

The service/model is not returning the full answer expected in the first request.
"response":"The following services are present in the bookinfo namespace:\n\n* reviews\n*"

If you request again the same query then...
"response":"The following services are present in the bookinfo namespace:\n\n* productpage\n* ratings\n* reviews\n* **d ....

Expected behavior

Give the full answer in the first request

Screenshots or output

The first call to the service the model truncate the response.

curl --insecure -X POST https://ols-route-openshift-lightspeed.apps.kiali.servicemesh.rhqeaws.com/v1/query -H "Content-Type: application/json" -d '{"media_type": "application/json", "query": "Check services in my namespace bookinfo"}' -H "Authorization: Bearer sha256~q9GRhVZv13puk6wzzkgjcmbWYBW3sL_GTBvoMlJPnAs"

Output

{"conversation_id":"ea7291c5-8224-4579-a63c-2e64bde196ac","response":"The following services are present in the `bookinfo` namespace:\n\n*   **reviews**\n*","referenced_documents":[{"doc_url":"https://docs.openshift.com/container-platform/4.21/service_mesh/v2x/ossm-create-mesh.html","doc_title":"Adding services to a service mesh"}],"truncated":false,"input_tokens":5507,"output_tokens":49,"available_quotas":{},"tool_calls":[{"name":"ossm_get_resource_details","args":{"namespaces":"bookinfo","resource_type":"service"},"id":"function-call-9568733829430823656","type":"tool_call"}],"tool_results":[{"id":"function-call-9568733829430823656","status":"success","content":"{\"cluster\":\"Kubernetes\",\"services\":[{\"name\":\"reviews\",\"namespace\":\"bookinfo\",\"istioSidecar\":true,\"cluster\":\"Kubernetes\",\"isAmbient\":false,\"appLabel\":true,\"additionalDetailSample\":null,\"annotations\":null,\"healthAnnotations\":{},\"ports\":null,\"labels\":{\"app\":\"reviews\",\"service\":\"reviews\"},\"selector\":{\"app\":\"reviews\"},\"istioReferences\":[],\"kialiWizard\":\"\",\"serviceRegistry\":\"Kubernetes\",\"health\":{\"requests\":{\"inbound\":{},\"outbound\":{},\"healthAnnotations\":{}}}},{\"name\":\"details\",\"namespace\":\"bookinfo\",\"istioSidecar\":true,\"cluster\":\"Kubernetes\",\"isAmbient\":false,\"appLabel\":true,\"additionalDetailSample\":null,\"annotations\":null,\"healthAnnotations\":{},\"ports\":null,\"labels\":{\"app\":\"details\",\"service\":\"details\"},\"selector\":{\"app\":\"details\"},\"istioReferences\":[],\"kialiWizard\":\"\",\"serviceRegistry\":\"Kubernetes\",\"health\":{\"requests\":{\"inbound\":{},\"outbound\":{},\"healthAnnotations\":{}}}},{\"name\":\"istio-ingressgateway\",\"namespace\":\"bookinfo\",\"istioSidecar\":true,\"cluster\":\"Kubernetes\",\"isAmbient\":false,\"appLabel\":false,\"additionalDetailSample\":null,\"annotations\":null,\"healthAnnotations\":{},\"ports\":null,\"labels\":null,\"selector\":{\"istio\":\"ingressgateway\"},\"istioReferences\":[],\"kialiWizard\":\"\",\"serviceRegistry\":\"Kubernetes\",\"health\":{\"requests\":{\"inbound\":{},\"outbound\":{},\"healthAnnotations\":{}}}},{\"name\":\"productpage\",\"namespace\":\"bookinfo\",\"istioSidecar\":true,\"cluster\":\"Kubernetes\",\"isAmbient\":false,\"appLabel\":true,\"additionalDetailSample\":null,\"annotations\":null,\"healthAnnotations\":{},\"ports\":null,\"labels\":{\"app\":\"productpage\",\"service\":\"productpage\"},\"selector\":{\"app\":\"productpage\"},\"istioReferences\":[{\"objectGVK\":{\"Group\":\"networking.istio.io\",\"Version\":\"v1\",\"Kind\":\"VirtualService\"},\"name\":\"bookinfo\",\"namespace\":\"bookinfo\",\"cluster\":\"\"},{\"objectGVK\":{\"Group\":\"networking.istio.io\",\"Version\":\"v1\",\"Kind\":\"Gateway\"},\"name\":\"bookinfo-gateway\",\"namespace\":\"bookinfo\",\"cluster\":\"\"}],\"kialiWizard\":\"\",\"serviceRegistry\":\"Kubernetes\",\"health\":{\"requests\":{\"inbound\":{},\"outbound\":{},\"healthAnnotations\":{}}}},{\"name\":\"ratings\",\"namespace\":\"bookinfo\",\"istioSidecar\":true,\"cluster\":\"Kubernetes\",\"isAmbient\":false,\"appLabel\":true,\"additionalDetailSample\":null,\"annotations\":null,\"healthAnnotations\":{},\"ports\":null,\"labels\":{\"app\":\"ratings\",\"service\":\"ratings\"},\"selector\":{\"app\":\"ratings\"},\"istioReferences\":[],\"kialiWizard\":\"\",\"serviceRegistry\":\"Kubernetes\",\"health\":{\"requests\":{\"inbound\":{},\"outbound\":{},\"healthAnnotations\":{}}}}],\"validations\":{\"service\":{\"details.bookinfo\":{\"name\":\"details\",\"namespace\":\"bookinfo\",\"cluster\":\"\",\"objectGVK\":{\"Group\":\"\",\"Version\":\"\",\"Kind\":\"service\"},\"valid\":true,\"checks\":[],\"references\":null},\"istio-ingressgateway.bookinfo\":{\"name\":\"istio-ingressgateway\",\"namespace\":\"bookinfo\",\"cluster\":\"\",\"objectGVK\":{\"Group\":\"\",\"Version\":\"\",\"Kind\":\"service\"},\"valid\":true,\"checks\":[],\"references\":null},\"productpage.bookinfo\":{\"name\":\"productpage\",\"namespace\":\"bookinfo\",\"cluster\":\"\",\"objectGVK\":{\"Group\":\"\",\"Version\":\"\",\"Kind\":\"service\"},\"valid\":true,\"checks\":[],\"references\":null},\"ratings.bookinfo\":{\"name\":\"ratings\",\"namespace\":\"bookinfo\",\"cluster\":\"\",\"objectGVK\":{\"Group\":\"\",\"Version\":\"\",\"Kind\":\"service\"},\"valid\":true,\"checks\":[],\"references\":null},\"reviews.bookinfo\":{\"name\":\"reviews\",\"namespace\":\"bookinfo\",\"cluster\":\"\",\"objectGVK\":{\"Group\":\"\",\"Version\":\"\",\"Kind\":\"service\"},\"valid\":true,\"checks\":[],\"references\":null}}}}","type":"tool_result","round":1}]}

Second call

{"conversation_id":"6fcd36a0-48c9-43d2-b961-2bc1d327ea30","response":"The following services are present in the `bookinfo` namespace:\n\n*   **productpage**\n*   **ratings**\n*   **reviews**\n*   **details**\n*   **istio-ingressgateway**\n\nAll services are reported","referenced_documents":[{"doc_url":"https://docs.openshift.com/container-platform/4.21/service_mesh/v2x/ossm-create-mesh.html","doc_title":"Adding services to a service mesh"}],"truncated":false,"input_tokens":5507,"output_tokens":52,"available_quotas":{},"tool_calls":[{"name":"ossm_get_resource_details","args":{"resource_type":"service","namespaces":"bookinfo"},"id":"function-call-17682839970247633445","type":"tool_call"}],"tool_results":[{"id":"function-call-17682839970247633445","status":"success","content":"{\"cluster\":\"Kubernetes\",\"services\":[{\"name\":\"productpage\",\"namespace\":\"bookinfo\",\"istioSidecar\":true,\"cluster\":\"Kubernetes\",\"isAmbient\":false,\"appLabel\":true,\"additionalDetailSample\":null,\"annotations\":null,\"healthAnnotations\":{},\"ports\":null,\"labels\":{\"app\":\"productpage\",\"service\":\"productpage\"},\"selector\":{\"app\":\"productpage\"},\"istioReferences\":[{\"objectGVK\":{\"Group\":\"networking.istio.io\",\"Version\":\"v1\",\"Kind\":\"VirtualService\"},\"name\":\"bookinfo\",\"namespace\":\"bookinfo\",\"cluster\":\"\"},{\"objectGVK\":{\"Group\":\"networking.istio.io\",\"Version\":\"v1\",\"Kind\":\"Gateway\"},\"name\":\"bookinfo-gateway\",\"namespace\":\"bookinfo\",\"cluster\":\"\"}],\"kialiWizard\":\"\",\"serviceRegistry\":\"Kubernetes\",\"health\":{\"requests\":{\"inbound\":{},\"outbound\":{},\"healthAnnotations\":{}}}},{\"name\":\"ratings\",\"namespace\":\"bookinfo\",\"istioSidecar\":true,\"cluster\":\"Kubernetes\",\"isAmbient\":false,\"appLabel\":true,\"additionalDetailSample\":null,\"annotations\":null,\"healthAnnotations\":{},\"ports\":null,\"labels\":{\"app\":\"ratings\",\"service\":\"ratings\"},\"selector\":{\"app\":\"ratings\"},\"istioReferences\":[],\"kialiWizard\":\"\",\"serviceRegistry\":\"Kubernetes\",\"health\":{\"requests\":{\"inbound\":{},\"outbound\":{},\"healthAnnotations\":{}}}},{\"name\":\"reviews\",\"namespace\":\"bookinfo\",\"istioSidecar\":true,\"cluster\":\"Kubernetes\",\"isAmbient\":false,\"appLabel\":true,\"additionalDetailSample\":null,\"annotations\":null,\"healthAnnotations\":{},\"ports\":null,\"labels\":{\"app\":\"reviews\",\"service\":\"reviews\"},\"selector\":{\"app\":\"reviews\"},\"istioReferences\":[],\"kialiWizard\":\"\",\"serviceRegistry\":\"Kubernetes\",\"health\":{\"requests\":{\"inbound\":{},\"outbound\":{},\"healthAnnotations\":{}}}},{\"name\":\"details\",\"namespace\":\"bookinfo\",\"istioSidecar\":true,\"cluster\":\"Kubernetes\",\"isAmbient\":false,\"appLabel\":true,\"additionalDetailSample\":null,\"annotations\":null,\"healthAnnotations\":{},\"ports\":null,\"labels\":{\"app\":\"details\",\"service\":\"details\"},\"selector\":{\"app\":\"details\"},\"istioReferences\":[],\"kialiWizard\":\"\",\"serviceRegistry\":\"Kubernetes\",\"health\":{\"requests\":{\"inbound\":{},\"outbound\":{},\"healthAnnotations\":{}}}},{\"name\":\"istio-ingressgateway\",\"namespace\":\"bookinfo\",\"istioSidecar\":true,\"cluster\":\"Kubernetes\",\"isAmbient\":false,\"appLabel\":false,\"additionalDetailSample\":null,\"annotations\":null,\"healthAnnotations\":{},\"ports\":null,\"labels\":null,\"selector\":{\"istio\":\"ingressgateway\"},\"istioReferences\":[],\"kialiWizard\":\"\",\"serviceRegistry\":\"Kubernetes\",\"health\":{\"requests\":{\"inbound\":{},\"outbound\":{},\"healthAnnotations\":{}}}}],\"validations\":{\"service\":{\"details.bookinfo\":{\"name\":\"details\",\"namespace\":\"bookinfo\",\"cluster\":\"\",\"objectGVK\":{\"Group\":\"\",\"Version\":\"\",\"Kind\":\"service\"},\"valid\":true,\"checks\":[],\"references\":null},\"istio-ingressgateway.bookinfo\":{\"name\":\"istio-ingressgateway\",\"namespace\":\"bookinfo\",\"cluster\":\"\",\"objectGVK\":{\"Group\":\"\",\"Version\":\"\",\"Kind\":\"service\"},\"valid\":true,\"checks\":[],\"references\":null},\"productpage.bookinfo\":{\"name\":\"productpage\",\"namespace\":\"bookinfo\",\"cluster\":\"\",\"objectGVK\":{\"Group\":\"\",\"Version\":\"\",\"Kind\":\"service\"},\"valid\":true,\"checks\":[],\"references\":null},\"ratings.bookinfo\":{\"name\":\"ratings\",\"namespace\":\"bookinfo\",\"cluster\":\"\",\"objectGVK\":{\"Group\":\"\",\"Version\":\"\",\"Kind\":\"service\"},\"valid\":true,\"checks\":[],\"references\":null},\"reviews.bookinfo\":{\"name\":\"reviews\",\"namespace\":\"bookinfo\",\"cluster\":\"\",\"objectGVK\":{\"Group\":\"\",\"Version\":\"\",\"Kind\":\"service\"},\"valid\":true,\"checks\":[],\"references\":null}}}}","type":"tool_result","round":1}]}

Metadata

Metadata

Assignees

No one assigned

    Labels

    lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions