Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified docs/config.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions docs/config.puml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
@startuml classes
set namespaceSeparator none
class "AuthenticationConfiguration" as src.models.config.AuthenticationConfiguration {
jwk_config : Optional[JwkConfiguration]
jwk_configuration
Comment on lines +4 to +5
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Verify the jwk_config vs jwk_configuration attribute naming.

The diagram shows both jwk_config : Optional[JwkConfiguration] and jwk_configuration in the AuthenticationConfiguration class. Based on the relevant code snippet from src/models/config.py, both attributes exist in the Python code, but this seems redundant and potentially confusing.

Please verify if both attributes are intentionally present in the actual implementation or if one should be removed:


🏁 Script executed:

#!/bin/bash
# Check the actual AuthenticationConfiguration class definition
ast-grep --pattern 'class AuthenticationConfiguration($$$) {
  $$$
}'

Length of output: 71


🏁 Script executed:

#!/bin/bash
# Locate the file defining AuthenticationConfiguration
file=$(rg -l "class AuthenticationConfiguration" --glob "*.py")
echo "Found in: $file"

# Show the class definition and its attributes
rg -A10 -B2 "class AuthenticationConfiguration" "$file"

# Search specifically for jwk_config and jwk_configuration
rg -n "jwk_config" "$file"
rg -n "jwk_configuration" "$file"

Length of output: 1069


Adjust PlantUML to Treat jwk_configuration as a Method, Not a Field

The AuthenticationConfiguration class defines:

  • jwk_config: Optional[JwkConfiguration] as a model field
  • def jwk_configuration(self) -> JwkConfiguration: as an instance method

In your UML diagram, move jwk_configuration from the attribute section into the operations section:

File: docs/config.puml
Lines: ~4–5 in the AuthenticationConfiguration class

Suggested diff:

 class AuthenticationConfiguration {
-   jwk_config : Optional[JwkConfiguration]
-   jwk_configuration
+   jwk_config : Optional[JwkConfiguration]
+
+   // Operations
+   + jwk_configuration() : JwkConfiguration
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
jwk_config : Optional[JwkConfiguration]
jwk_configuration
class AuthenticationConfiguration {
jwk_config : Optional[JwkConfiguration]
// Operations
+ jwk_configuration() : JwkConfiguration
}
🤖 Prompt for AI Agents
In docs/config.puml around lines 4 to 5, the UML diagram incorrectly shows
jwk_configuration as a field, but it is actually a method in the
AuthenticationConfiguration class. Move jwk_configuration from the attributes
section to the operations section in the class definition to correctly represent
it as a method.

k8s_ca_cert_path : Optional[FilePath]
k8s_cluster_api : Optional[AnyHttpUrl]
module : str
Expand All @@ -10,6 +12,7 @@ class "AuthenticationConfiguration" as src.models.config.AuthenticationConfigura
class "Configuration" as src.models.config.Configuration {
authentication : Optional[AuthenticationConfiguration]
customization : Optional[Customization]
inference : Optional[InferenceConfiguration]
llama_stack
mcp_servers : list[ModelContextProtocolServer]
name : str
Expand All @@ -33,6 +36,19 @@ class "DataCollectorConfiguration" as src.models.config.DataCollectorConfigurati
ingress_server_url : Optional[str]
check_data_collector_configuration() -> Self
}
class "InferenceConfiguration" as src.models.config.InferenceConfiguration {
default_model : Optional[str]
default_provider : Optional[str]
check_default_model_and_provider() -> Self
}
class "JwkConfiguration" as src.models.config.JwkConfiguration {
jwt_configuration
url : AnyHttpUrl
}
Comment on lines +44 to +47
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Fix the jwt_configuration attribute type specification.

The jwt_configuration attribute in JwkConfiguration should specify its type for consistency with other attributes in the diagram.

-  jwt_configuration
+  jwt_configuration : JwtConfiguration
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
class "JwkConfiguration" as src.models.config.JwkConfiguration {
jwt_configuration
url : AnyHttpUrl
}
class "JwkConfiguration" as src.models.config.JwkConfiguration {
jwt_configuration : JwtConfiguration
url : AnyHttpUrl
}
🤖 Prompt for AI Agents
In docs/config.puml around lines 44 to 47, the jwt_configuration attribute in
the JwkConfiguration class lacks a type specification. Add the appropriate type
to jwt_configuration to match the style of other attributes, ensuring
consistency in the diagram's attribute declarations.

class "JwtConfiguration" as src.models.config.JwtConfiguration {
user_id_claim : str
username_claim : str
}
class "LlamaStackConfiguration" as src.models.config.LlamaStackConfiguration {
api_key : Optional[str]
library_client_config_path : Optional[str]
Expand Down Expand Up @@ -70,6 +86,7 @@ class "UserDataCollection" as src.models.config.UserDataCollection {
check_storage_location_is_set_when_needed() -> Self
}
src.models.config.DataCollectorConfiguration --* src.models.config.UserDataCollection : data_collector
src.models.config.JwtConfiguration --* src.models.config.JwkConfiguration : jwt_configuration
src.models.config.LlamaStackConfiguration --* src.models.config.Configuration : llama_stack
src.models.config.ServiceConfiguration --* src.models.config.Configuration : service
src.models.config.TLSConfiguration --* src.models.config.ServiceConfiguration : tls_config
Expand Down