Skip to content

Conversation

@GreatEugenius
Copy link
Collaborator

@GreatEugenius GreatEugenius commented Jan 23, 2026

Linked issue: #469

Purpose of change

Introduce Hierarchical ResourceClassName for Cross-Language Resource Creation

Tests

E2E test

API

Yes, use ResourceName to replace Constant.

Documentation

  • doc-needed
  • doc-not-needed
  • doc-included

@GreatEugenius GreatEugenius marked this pull request as draft January 23, 2026 09:46
@github-actions github-actions bot added priority/major Default priority of the PR or issue. fixVersion/0.2.0 The feature or bug should be implemented/fixed in the 0.2.0 version. doc-needed Your PR changes impact docs. labels Jan 23, 2026
@GreatEugenius GreatEugenius changed the title [api] Introduce Hierarchical ResourceName for Cross-Language Resource Creation [api] Introduce Hierarchical ResourceName for Resource Creation Jan 23, 2026
@GreatEugenius
Copy link
Collaborator Author

GreatEugenius commented Jan 23, 2026

Hi @xintongsong, could you please confirm the order of ResourceName hierarchy first? I will commit to the document and implement the Python side once the order is finalized.

@xintongsong
Copy link
Contributor

This might be more like a personal opinion, but I'd prefer ResourceName.ChatModel.ANTHROPIC_CONNECTION over ResourceName.ChatModel.Anthropic.CONNECTION.

Imagine typing this in an IDE, when you type ANT, you'll see a list of only two options ANTHROPIC_CONNECTION and ANTHROPIC_SETUP, and you can easily select between them. Having to first select Anthropic, then type another dot to show the list of CONNECTION and SETUP just makes things more complicate.

On the other hand, without this change, when you type OLL, you'll see a list of OLLAMA_CHAT_MODEL_CONNECTION, OLLAMA_CHAT_MODEL_SETUP, OLLAMA_EMBEDDING_MODEL_CONNECTION, OLLAMA_EMBEDDING_MODEL_SETUP and potentially more if we support more resource types in future. First narrowing down to ChatModel should be helpful significantly reduce the options in the list.

@xintongsong
Copy link
Contributor

And for the python wrapper, I'd suggest ResourceName.ChatModel.PYTHON_WRAPPER_CONNECTION and ResourceName.ChatModel.PYTHON_WRAPPER_SETUP, to make it more explicit that this is a wrapper rather than a normal resource provider. The infix _WRAPPER_ doesn't really add any operational cost, but would be more readable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc-needed Your PR changes impact docs. fixVersion/0.2.0 The feature or bug should be implemented/fixed in the 0.2.0 version. priority/major Default priority of the PR or issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants