Skip to content

Conversation

locnguyen1986
Copy link
Contributor

@locnguyen1986 locnguyen1986 commented Oct 8, 2025

  • Remove Jan as default inference, check and add Jan as organization provider when start with env flag: JAN_INFERENCE_SETUP
  • Adds a full provider domain (providers, provider models, model catalogs)
  • Reworks chat/completion/conversation flows to resolve the correct provider per requested model
  • Restructure /v1/models list with optional provider metadata, /v1/models/providers listings
  • Remove all caching on models and providers, make everything clean for moving


func (cs *CronService) Start(ctx context.Context, ctab *crontab.Crontab) {
// Run initial check
cs.InferenceModelRegistry.CheckInferenceModels(ctx)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I remove cache support in this version for clean PR.
So no need to reload models frequently, let call it directly.

@@ -0,0 +1,77 @@
package model

import (
Copy link
Contributor Author

Choose a reason for hiding this comment

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

all fields are sync from OpenRouter.
We may follow them first and build own variables later.


type ProviderKind string

const (
Copy link
Contributor Author

Choose a reason for hiding this comment

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

have to list them all, different provider may require different header or login.

@@ -0,0 +1,89 @@
package model
Copy link
Contributor Author

Choose a reason for hiding this comment

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

each provider should handle their pricing, not base on the model, base on provider-model relationship

@@ -0,0 +1,137 @@
package model
Copy link
Contributor Author

Choose a reason for hiding this comment

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

lets keep this utils in model, those helpers only serve code inside, we may wrapper to utils folder if other domains or services call that

projectID = ptr.ToUint(input.ProjectID)
}

if kind != ProviderCustom {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

we only allow one provider kind in system if it's not custom

chatRoute.authService.AppUserAuthMiddleware(),
chatRoute.authService.RegisteredUserMiddleware(),
)
chatRouter := router.Group("/chat")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

remove auth of /models and /completions now

@@ -1,19 +1,9 @@
package cache

Copy link
Contributor Author

Choose a reason for hiding this comment

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

remove all caches for clean PR, don't want to mix a lot of things now

Copy link
Collaborator

@jjchen01 jjchen01 left a comment

Choose a reason for hiding this comment

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

LGTM

@locnguyen1986 locnguyen1986 merged commit 86a955c into main Oct 9, 2025
1 check passed
@locnguyen1986 locnguyen1986 deleted the feat/164/provider-model-catalog branch October 9, 2025 08:59
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