Skip to content

Conversation

mabashian
Copy link
Member

@mabashian mabashian commented Aug 6, 2025

Jira Issue: https://issues.redhat.com/browse/AAP-51590

Assisted-by: claude-code

Description

An alternative approach to #1729

This approach is a bit of the inverse of the other approach. With these changes, the WCA bits are appended to the end of the project name and displayed on the login screen so long as one of the pipelines is configured with a wca provider. This means that the project name no longer needs to contain the WCA bits as the suffix will be added programatically. I set the default suffix in a new environment variable called ANSIBLE_AI_PROJECT_WCA_SUFFIX. We could hard code the suffix in the application code but I thought it would be nice to have the ability to overwrite it with a variable if needed (but this can be easily changed).

This PR also adds the /chatbot "next" query parameter logic so that the suffix is not added if the user is attempting to navigate straight to the chatbot (which was the original issue outlined in https://issues.redhat.com/browse/AAP-50250

Note that I did add logic to NOT append the suffix if the suffix is already present in the project name. That means that (I think) these changes should not impact any current deployments of the ai-connect-service. In order to FULLY address AAP-50250 we'll need to make sure that any lightspeed service with an ANSIBLE_AI_PROJECT_NAME that includes the WCA suffix is updated to have the WCA suffix removed (so that the application code begins adding it dynamically).

Testing

  1. Pull down the PR
  2. Make sure that ANSIBLE_AI_MODEL_MESH_CONFIG has a pipeline in it (like ModelPipelineCompletions) with a wca provider
  3. Set ANSIBLE_AI_PROJECT_NAME to something arbitrary
  4. Start the service, navigate to the login page and you should see " with IBM watsonx Code Assistant" appended to the end of the project name

You can also remove the wca pipeline from your config and the suffix should go away

You can also navigate straight the chatbot endpoint (/chatbot) unauthenticated and the suffix should not be present on the login screen

Scenarios tested

Production deployment

  • This code change is ready for production on its own
  • This code change requires the following considerations before going to production:

@mabashian mabashian force-pushed the mabashian/AAP-50250-login-page-text-v2 branch 2 times, most recently from 8462f2a to 97354d4 Compare August 11, 2025 20:39
@mabashian mabashian marked this pull request as ready for review August 12, 2025 15:54
@mabashian mabashian force-pushed the mabashian/AAP-50250-login-page-text-v2 branch from 97354d4 to f1492d1 Compare August 13, 2025 17:49
Copy link

@goneri
Copy link
Contributor

goneri commented Aug 14, 2025

I prefer this strategy, however, I would prefer if we:

  • rename get_project_name_with_wca_suffix()
  • generalize the use of the new function in place of the current settings.ANSIBLE_AI_PROJECT_NAME calls

return False


def get_project_name_with_wca_suffix(base_project_name: str, request=None) -> str:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

base_project_name can safely default on settings.ANSIBLE_AI_PROJECT_NAME

@goneri
Copy link
Contributor

goneri commented Aug 14, 2025

In the future, it could be nice to have a commercial name field in the provider configuration, and we would just inject that in the final string.

  "ModelPipelineRoleExplanation": {
    "provider": "wca",
    "config": {
      "inference_url": "https://api.dataplatform.test.cloud.ibm.com",
      "commercial_name": "WatsonX by IBM"
      (...)
    }
  }

@mabashian mabashian marked this pull request as draft August 21, 2025 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants