* Fix migration
* Fix migration to take care of various nullability cases
* Address comments on PR
* Rename variables to be more descriptive
* Make helpers private
* Fix select statement
* Add comments to explain the involved logic
* Saving changes
* Finish script to revalidate `display_model_names`
* Address comments on PR by greptile
* Add missing columns
* Pull difference operator out into binding
* Add deletion prior to re-insertion
* Use map from shared llm-provider file instead
* Use helper function instead of copying code
* Remove delete and convert into an update statement
* Use pydantic for ModelConfigurations
* Update to do nothing on-conflict rather than update
* Address nits on PR
* Add default visible model(s) for bedrock
* Perform an update on conflict instead of doing nothing
* Fix migration
* Fix migration to take care of various nullability cases
* Address comments on PR
* Rename variables to be more descriptive
* Make helpers private
* Fix select statement
* Add comments to explain the involved logic
* Add helpers for viewing visible model names
* Fix logic for missing model + display-model names in migration
* Add multi text array field
* Add multiple values to model configuration for a custom LLM provider
* Fix reference to old field name
* Add migration
* Update all instances of model_names / display_model_names to use new schema migration
* Update background task
* Update endpoints to not throw errors
* Add test
* Update backend/alembic/versions/7a70b7664e37_add_models_configuration_table.py
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
* Update backend/onyx/background/celery/tasks/llm_model_update/tasks.py
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
* Fix list comprehension nits
* Update web/src/components/admin/connectors/Field.tsx
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
* Update web/src/app/admin/configuration/llm/interfaces.ts
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
* Implement greptile recommendations
* Update backend/onyx/db/llm.py
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
* Update backend/onyx/server/manage/llm/api.py
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
* Update backend/onyx/background/celery/tasks/llm_model_update/tasks.py
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
* Update backend/onyx/db/llm.py
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
* Fix more greptile suggestions
* Run formatter again
* Update backend/onyx/db/models.py
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
* Add relationship to `LLMProvider` and `ModelConfigurations` classes
* Use sqlalchemy ORM relationships instead of manually populating fields
* Upgrade migration
* Update interface
* Remove all instances of model_names and display_model_names from backend
* Add more tests and fix bugs
* Run prettier
* Add types
* Update migration to perform data transformation
* Ensure native llm providers don't have custom max input tokens
* Start updating frontend logic to support custom max input tokens
* Pass max input tokens to LLM class (to be passed into `litellm.completion` call later)
* Add ModelConfigurationField component for custom llm providers
* Edit spacing and styling of model configuration matrix
* Fix error message displaying bug
* Edit opacity of `FiX` field for first index
* Change opacity back
* Change roundness
* Address comments on PR
* Perform fetching of `max_input_tokens` at the beginning of the callgraph and rope it throughout the entire callstack
* Change `add` to `execute`
* Move `max_input_tokens` into `LLMConfig`
* Fix bug with error messages not being cleared
* Change field used to fetch LLMProvider
* Fix model-configuration UI
* Address comments
* Remove circular import
* Fix failing tests in GH
* Fix failing tests
* Use `isSubset` instead of equality to determine native vs custom LLM Provider
* Remove unused import
* Make responses always display max_input_tokens
* Fix api endpoint to hit
* Update types in web application
* Update object field
* Fix more type errors
* Fix failing llm provider tests
---------
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
* Fix duplicate kwarg issue
* Change how vertex_credentials are passed
* Modify temporary dict instead
* Change string to a global constant
* Add extra condition to if-check during population of map
* bump fastapi and starlette
* bumping llama index and nltk and associated deps
* bump to fix python-multipart
* bump aiohttp
* update package lock for examples/widget
* bump black
* sentencesplitter has changed namespaces
* fix reorder import check, fix missing passlib
* update package-lock.json
* black formatter updated
* reformatted again
* change to black compatible reorder
* change to black compatible reorder-python-imports fork
* fix pytest dependency
* black format again
* we don't need cdk.txt. update packages to be consistent across all packages
---------
Co-authored-by: Richard Kuo (Onyx) <rkuo@onyx.app>
Co-authored-by: Richard Kuo <rkuo@rkuo.com>
The code for token cost calculation fails when using a LiteLLM proxy due to mismatch with the provider naming. For now, just handle this exception and assume cost 0 when that happens instead of breaking the flow - A more precise, LiteLLM proxy based cost calculation (relying in the `/model/info`) LiteLLM Proxy method will be needed
* Add gemini well-known-llm-provider
* Edit styling of anonymous function
* Remove space
* Edit how advanced options are displayed
* Add VertexAI to acceptable llm providers
* Add new `FileUploadFormField` component
* Edit FileUpload component
* Clean up logic for displaying native llm providers; add support for more complex `CustomConfigKey` types
* Fix minor nits in web app
* Add ability to pass vertex credentials to `litellm`
* Remove unused prop
* Change name of enum value
* Add back ability to change form based on first time configurations
* Create new Error with string instead of throwing raw string
* Add more Gemini models
* Edit mappings for Gemini models
* Edit comment
* Rearrange llm models
* Run black formatter
* Remove complex configurations during first time registration
* Fix nit
* Update llm provider name
* Edit temporary formik field to also have the filename
* Run reformatter
* Reorder commits
* Add advanced configurations for enabled LLM Providers
* sanitize llm keys and handle updates properly
* fix llm provider testing
* fix test
* mypy
* fix default model editing
---------
Co-authored-by: Richard Kuo (Danswer) <rkuo@onyx.app>
Co-authored-by: Richard Kuo <rkuo@rkuo.com>